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

Fix container's deploy when used with keys. #300

Conversation

jraygauthier
Copy link
Member

Fundamentally there was this missing self.set_common_state(defn)
that wasn't called on create which is essential to retrieve
keys.

This should also fix an issue I had when storeKeysOnMachine
was not set explicitly which caused the keys not to be sent.

Attempted to fix the use of stop/start when there are keys.
There remain some underlying problem I couldn't understand yet.

@jraygauthier
Copy link
Member Author

Can somebody tell me what's wrong with this patch? Does nobody use containers with secret
keys (e.g: pulling from a repository for example)? Anyway, if anybody uses secrets keys for
their amazon cloud or any other cloud, don't they need to test locally?

@hrdinka
Copy link

hrdinka commented Dec 12, 2015

I can confirm this bug. Here is a minimal test:

{
  test =
    { ... }:
    {
      deployment.targetEnv = "container";
      deployment.container.host = "localhost";
      deployment.keys.password.text = "foobar";
    }; 
}

Nixops does never send the keys and /run/keys stays empty. When keys.target gets started on the machine its activation will freeze forever cause it waits for /run/keys/done to be existent. I'll test this patch ASAP.

@jraygauthier
Copy link
Member Author

Re-applied and re-tested on top of latest.

As the '-p' flag attempt to preserve file attributes
with scp, it was making the scp command fail in
contexts where preserving attributes is not possible
(this is without mentionning the '22' argument that
followed and which seems to be accepted silently).
@jraygauthier jraygauthier force-pushed the jrg/fix_sending_keys_with_containers branch from a19e697 to 490ae6a Compare September 23, 2016 02:42
@ip1981
Copy link
Contributor

ip1981 commented May 6, 2017

Maybe related to #650 (comment)

@domenkozar
Copy link
Member

I've just merged #804 that should fix this.

@jraygauthier
Copy link
Member Author

@domenkozar I just tested and confirm #804 fixes the problem.

@jraygauthier
Copy link
Member Author

Thanks for the merge!

@domenkozar domenkozar closed this Dec 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants