weixin_39877050 2020-11-21 18:42 采纳率: 0%
浏览 0

nixops send-keys does nothing when deploying to NixOS containers

Container deployments that wait for ...-key.service hang forever, because the keys are never uploaded.

nixops send-keys does nothing for container deployments.

On first look, this is because there's this:

https://github.com/NixOS/nixops/blob/c5a0e288b0c671a959e1488b94ed3c6b5f4fbdf4/nixops/backends/init.py#L48

storeKeysOnMachine defaulting to True even though the manual release notes say for nixops 1.2 "Changed default value of deployment.storeKeysOnMachine to false".

However, even after setting this to True, nixops send-keys does nothing, because get_keys() here returns {} for unknown reason. I can see the keys being set correctly in the MachineDefinition here if I print self.keys there.

该提问来源于开源项目:NixOS/nixops

  • 写回答

5条回答 默认 最新

  • weixin_39877050 2020-11-21 18:42
    关注

    I think I found it. Same issue as 985886cff4ac09c9cb635e31b45f0cc0dbd84e0a.

    def create() in container.py lacks set_common_state().

    The commit message even says:

    
        Add missing set_common_state.
    
        Without this e.g. send-keys doesn't work.
    
    评论

报告相同问题?