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 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 ryantm:key branch 2 times, most recently from 0700d3d to e5c784b Jun 30, 2020
@cole-h
cole-h approved these changes Jul 2, 2020
Copy link
Member

cole-h left a comment

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 Jun 30, 2020
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 adisbladis force-pushed the ryantm:key branch from e5c784b to b5aebad Jul 8, 2020
@adisbladis
Copy link
Member

adisbladis commented Jul 8, 2020

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
10 checks passed
10 checks passed
parsing
Details
build
Details
black
Details
mypy
Details
flake8
Details
mypy-ratchet
Details
coverage
Details
docs
Details
poetry-up-to-date
Details
docs/readthedocs.org:nixops Read the Docs build succeeded!
Details
@ryantm ryantm deleted the ryantm:key branch Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.