nixos/cloudstack-image: initial import#44573
Merged
ryantm merged 1 commit intoNixOS:masterfrom Feb 24, 2019
Merged
Conversation
fpletz
reviewed
Aug 6, 2018
Member
There was a problem hiding this comment.
Why not just use pkgs here? What do you mean with regular qemu-kvm package?
Member
Author
Member
There was a problem hiding this comment.
This forcing a re-import of nixpkgs sounds wrong, but… cc @nlewo? (will let you poke eelco if you just took the line from his commit)
Member
There was a problem hiding this comment.
Can you test if using pkgs just work?
Member
Member
Author
There was a problem hiding this comment.
It works just with pkgs. I'll update the PR.
vincentbernat
added a commit
to vincentbernat/nixpkgs
that referenced
this pull request
Aug 7, 2018
Some modules of cloud-init can cope with a network not immediately available (notably, the EC2 module), but some others won't retry if network is not available (notably, the Cloudstack module). network.target doesn't give much guarantee about the network availability. Applications not able to start without a fully configured network should be ordered after network-online.target. Also see NixOS#44573 and NixOS#44524.
9 tasks
xeji
pushed a commit
that referenced
this pull request
Aug 7, 2018
Some modules of cloud-init can cope with a network not immediately available (notably, the EC2 module), but some others won't retry if network is not available (notably, the Cloudstack module). network.target doesn't give much guarantee about the network availability. Applications not able to start without a fully configured network should be ordered after network-online.target. Also see #44573 and #44524.
7945572 to
6490bca
Compare
Member
Author
|
I've updated the commit to not mess with cloud-init unit file. |
Member
Author
|
I have used this change since a few weeks without any remaining issue. How should we move forward? |
Cloudstack images are simply using cloud-init. They are not headless as a user usually have access to a console. Otherwise, the difference with Openstack are mostly handled by cloud-init. This is still some minor issues. Notably, there is no non-root user. Other cloud images usually come with a user named after the distribution and with sudo. Would it make sense for NixOS? Cloudstack gives the user the ability to change the password. Cloud-init support for this is imperfect and the set-passwords module should be declared as `- [set-passwords, always]` for this to work. I don't know if there is an easy way to "patch" default cloud-init configuration. However, without a non-root user, this is of no use. Similarly, hostname is usually set through cloud-init using `set_hostname` and `update_hostname` modules. While the patch to declare nixos to cloud-init contains some code to set hostname, the previously mentioned modules are not enabled.
6490bca to
15f98b7
Compare
Member
|
Seems like this has minimal impact on other parts of nixpkgs, and people were mostly okay with it a while ago, so I'm going to merge it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation for this change
Cloudstack images are simply using cloud-init. They are not headless
as a user usually have access to a console. Otherwise, the difference
with Openstack are mostly handled by cloud-init.
This is still some minor issues. Notably, there is no non-root user.
Other cloud images usually come with a user named after the
distribution and with sudo. Would it make sense for NixOS?
Cloudstack gives the user the ability to change the password.
Cloud-init support for this is imperfect and the set-passwords module
should be declared as
- [set-passwords, always]for this to work. Idon't know if there is an easy way to "patch" default cloud-init
configuration. However, without a non-root user, this is of no use.
Similarly, hostname is usually set through cloud-init using
set_hostnameandupdate_hostnamemodules. While the patch todeclare nixos to cloud-init contains some code to set hostname, the
previously mentioned modules are not enabled.
About the cloud-init hack for ordering, I discuss the issue in PR #44524.
I have tested this commit based on master but also on 18.03. I am not familiar with NixOS yet.
Things done
sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)nix path-info -Sbefore and after)