-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Several updates to config and environment settings #403
Conversation
4124487
to
4e7f409
Compare
this works great! |
this one shows a weird behaviour: when I Oh, I think I found at least some extra conditions for this error. So, if the list is formatted without spaces before the dashes it works fine, by adding the If the list has spaces before dashes, it reshuffles the items in the list. Also Note: when adding to the list, maybe it should go as first item by default, rather than last? (if I am adding it, it probably has priority over the default one) |
this works great! |
works beautifully! just a comment here, on editing the settings file. once the This would be useful in deployments, even if users can't edit the central settings, at least they can inspect them..? Thoughts? |
@marcodelapierre I think the list sorting is just because pyaml does that automatically - I'd need to create a special sorter to disable it. |
because the order has a meaning of priority, then I'd suggest having the default |
can this help? yaml/pyyaml#143 |
@marcodelapierre I was just looking at that! The one constraint is:
Is that reasonable to set? I can do a try/except and then print a warning if it isn't supported. And I'm not sure this is for lists too. |
yeah saw it says dicts ... worth a quick go? if it works, yes try/except is desirable, I know of old clusters that still have 3.6.x ... |
I can add this, but I'm not sure how useful it is if the user-config over-rides it. |
1b6ed87
to
38a28b0
Compare
okay @marcodelapierre please see updates! 38a28b0.
|
38a28b0
to
cffe038
Compare
@marcodelapierre the docker/podman rmi is updated so the tag and image is actually deleted :) |
Signed-off-by: vsoch <[email protected]>
cffe038
to
d129dad
Compare
Let me share with you my evil deployment setup. There's one SHPC installation system wide, managed by the sys. admin. Sys. admin. customises the "central" settings using user-specific env variables (on the lines of But then sys. admin. still has to be able to install container modules in a system wide location...and can achieve that thanks to their SHPC user settings. To summarise, in this deployment then, the "user" settings are used somewhat counter-intuitively for system-wide installations, and the "central" ones for user-specific installations. This flipping allows SHPC to work out-of-the-box for users, without them having to customise settings in most cases. Sys. admins. might still need to edit both the "central" settings and their own "user" ones, hence the |
Now proceeding with tests of the new commits above |
this one's fine: |
with the ordering of the registry list, I am still having issues (python 3.8.2):
|
What should we try? It looks like sort_keys didn’t work. I’ll google around for a custom save function. |
Also, note how CLI edits to BEFORE
AFTER
|
That is strange - it must be a bug with the library ruamel. I chose it because it explicitly allowed me to save those comments! |
Not really a solution, but just a patch: As it was before, ie without sort_keys, it was working as far as there was no empty space before the dashes .. so we could put a warning in the yml and docos.. I'll get back with a proper solution if I find one! |
…ten) and printing warning Signed-off-by: vsoch <[email protected]>
c538784
to
eb43118
Compare
Re: podman uninstall I am still getting a different behaviour compared to yours, in that I always have a spare entry in my This is with the latest commit However, there might be an important detail, I am using a very old version of Podman, 1.6.2. I was lazy when I setup the VM and got whatever version was in the apt repo. Maybe that explains things..
|
oh interesting! I'm using a much newer one:
Maybe the change is with this PR here: containers/podman#7155 ? I think that might be it because in testing I noticed that the container is only untagged unless I use Just curious - when you install and do |
Can I ask you to test My run succeeds, but it has leftovers upon completion, with both the digest and the tag images:
based on my output of |
@marcodelapierre that's a bug I think - I need to add an uninstall to the module. Before it was simple enough to just delete the entire testing root, but now with podman we need to run uninstall to delete containers too! As another check I can add a podman images to the test file. |
0576c04
to
e8f37df
Compare
Thanks for checking with your latest version, sure I totally agree we can ignore this behaviour from such an old version :-)
Getting the same behaviour - the digest is always left there:
|
Very final comment for this PR -- only if easy to implement: #406 |
e8b4ca8
to
256dbd1
Compare
Phew finally! I was struggling with GitHub action syntax. @marcodelapierre since you've confirmed the issue with podman is on your host (and it works on mine): $ podman pull python:latest
✔ docker.io/library/python:latest
Trying to pull docker.io/library/python:latest...
Getting image source signatures
Copying blob d960726af2be done
Copying blob 8962bc0fad55 done
Copying blob e8d62473a22d done
Copying blob 532f6f723709 done
Copying blob 65d943ee54c1 done
Copying blob 1334e0fe2851 done
Copying blob aec2e3a89371 done
Copying blob 062ada600c9e done
Copying blob 1ec7c3bcb4b2 done
Copying config 5b3b4504ff done
Writing manifest to image destination
Storing signatures
5b3b4504ff1f7b859dbc5d7fb86f4afc644be62f99b8ced636fbca64c8a6c2de
# python is there!
$ podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/library/python latest 5b3b4504ff1f 2 weeks ago 909 MB
docker.io/vanessa/salad <none> daf4e5a88131 2 years ago 8 MB
$ podman rmi python:latest
Untagged: docker.io/library/python:latest
Deleted: 5b3b4504ff1f7b859dbc5d7fb86f4afc644be62f99b8ced636fbca64c8a6c2de
# python is no longer there!
$ podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/vanessa/salad <none> daf4e5a88131 2 years ago 8 MB I think we can disregard that issue. Are we ready for merge and release? |
Thanks @vsoch , I am going ahead with one final test then |
So, when testing with however when testing with a modified
|
Can you give me full commands to reproduce? |
edited
and then
|
…efore and after Signed-off-by: vsoch <[email protected]>
256dbd1
to
c66051b
Compare
I can't do a test on my local machine, but test does run uninstall, so I can mimic that. When I do that, I can't reproduce, either referencing the repository name python or just one tag. $ shpc install --container-tech podman python:3.9.5-alpine
Trying to pull docker.io/library/python@sha256:02311d686cd35b0f838854d6035c679acde2767a4fd09904e65355fbd9780f8a...
Getting image source signatures
Copying blob 540db60ca938 done
Copying blob 0faf4e7f2207 done
Copying blob f9ef3a05a91e done
Copying blob 629719f9106a done
Copying blob d037ddac5dde done
Copying config 2d64a2341b done
Writing manifest to image destination
Storing signatures
2d64a2341b7c19d37cc1262280756014b071eb187e4605c6cc9f749311a3d0b8
Module python:3.9.5-alpine was created.
$ shpc install --container-tech podman python:3.9.2-alpine
Trying to pull docker.io/library/python@sha256:f046c06388c0721961fe5c9b6184d2f8aeb7eb01b39601babab06cfd975dae01...
Getting image source signatures
Copying blob 1d917aee477c done
Copying blob 83ca130858d1 done
Copying blob ca3cd42a7c95 done
Copying blob 7bc50e7d1ae3 done
Copying blob 3d2c0e52073b done
Copying config 1238239159 done
Writing manifest to image destination
Storing signatures
po123823915946cc85077b22e1672d38d449c988cbb4d40335da69e962d0e83204
dmanModule python:3.9.2-alpine was created.
$ podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/library/python 3.9.5-alpine 2d64a2341b7c 2 weeks ago 48 MB
docker.io/library/python 3.9.2-alpine 123823915946 2 months ago 47.6 MB
docker.io/vanessa/salad <none> daf4e5a88131 2 years ago 8 MB
$ shpc uninstall --container-tech podman python
Are you sure you want to uninstall $container_base/python, and all content below it? y
$container_base/python and all subdirectories been removed.
Are you sure you want to uninstall $module_base/python, and all content below it? y
$module_base/python and all subdirectories been removed.
$ podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/vanessa/salad <none> daf4e5a88131 2 years ago 8 MB
$ shpc install --container-tech podman python:3.9.2-alpine
Trying to pull docker.io/library/python@sha256:f046c06388c0721961fe5c9b6184d2f8aeb7eb01b39601babab06cfd975dae01...
Getting image source signatures
Copying blob ca3cd42a7c95 done
Copying blob 3d2c0e52073b done
Copying blob 1d917aee477c done
Copying blob 83ca130858d1 done
Copying blob 7bc50e7d1ae3 done
Copying config 1238239159 done
Writing manifest to image destination
Storing signatures
123823915946cc85077b22e1672d38d449c988cbb4d40335da69e962d0e83204
Module python:3.9.2-alpine was created.
$ shpc install --container-tech podman python:3.9.5-alpine
Trying to pull docker.io/library/python@sha256:02311d686cd35b0f838854d6035c679acde2767a4fd09904e65355fbd9780f8a...
Getting image source signatures
Copying blob d037ddac5dde done
Copying blob 0faf4e7f2207 done
Copying blob 540db60ca938 done
Copying blob f9ef3a05a91e done
Copying blob 629719f9106a done
Copying config 2d64a2341b done
Writing manifest to image destination
Storing signatures
2d64a2341b7c19d37cc1262280756014b071eb187e4605c6cc9f749311a3d0b8
Module python:3.9.5-alpine was created.
$ shpc uninstall --container-tech podman python:3.9.5-alpine
$container_base/python/3.9.5-alpine does not exist.
Are you sure you want to uninstall $module_base/python/3.9.5-alpine, and all content below it? y
$module_base/python/3.9.5-alpine and all subdirectories been removed.
(env) (base) vanessa@vanessa-ThinkPad-T490s:~/Desktop/Code/singularity-hpc$ podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/library/python 3.9.2-alpine 123823915946 2 months ago 47.6 MB
docker.io/vanessa/salad <none> daf4e5a88131 2 years ago 8 MB It could be that for test we need to just refer to the general namespace and not the tag, I'll try updating to do that (although I can't test here). |
@marcodelapierre I updated the test. Sorry if it doesn't work ;/ |
YESSSSS! it works! well, to me this can be merged! |
Music to my ears! 🎶 Hooray!! :D |
This PR will address several new issues!
Signed-off-by: vsoch [email protected]