Skip to content
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

add deployment.keys.<name>.name #1378

Merged
merged 2 commits into from Jul 8, 2020
Merged

add deployment.keys.<name>.name #1378

merged 2 commits into from Jul 8, 2020

Conversation

ryantm
Copy link
Member

@ryantm ryantm commented Jun 30, 2020

allows multiple keys to have the same name

I haven't tested these changes against the master branch because I'm using nixops 1.7 currently. But similar changes work against 1.7.

@ryantm ryantm force-pushed the key branch 2 times, most recently from 0700d3d to e5c784b Compare June 30, 2020 21:38
Copy link
Member

@cole-h cole-h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beat me to it!

Tried this out locally (from master-ish), and it works as expected.

Example output:

scadrial> copying closure...
cosmere> closures copied successfully
scadrial> uploading key ‘secret-foo’ to ‘/run/keys/secret-bar’...
scadrial> stopping the following units: home-manager-vin.service
scadrial> activating the configuration...
scadrial> setting up /etc...
scadrial> reloading user units for root...
scadrial> reloading user units for vin...
scadrial> setting up tmpfiles
scadrial> starting the following units: home-manager-vin.service
scadrial> the following new units were started: libvirtd.service
scadrial> activation finished successfully
cosmere> deployment finished successfully

ryantm and others added 2 commits July 8, 2020 12:37
allows multiple keys to have the same name
With the addition of `deployment.keys.<name>.name` it's increasingly
likely to make a mistake and list the same path multiple times in a
deployment, leading to a race when uploading keys.
@adisbladis
Copy link
Member

This is a great addition, however it increases the likelihood that you're going to have multiple keys pointing to the same path.

I took the liberty of rebasing and adding a uniqueness constraint for paths in b5aebad.

@adisbladis adisbladis merged commit 4f698de into NixOS:master Jul 8, 2020
@ryantm ryantm deleted the key branch July 8, 2020 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants