summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-03-22add code to invoke networking configScott Moser
there is no data source that has a populated network_config() so at this point this doesn't do anything.
2016-03-22move some of the pickle loading out of Init, into private methodsScott Moser
I plan to re-use these methods later. They stand alone even if they dont end up getting used, though.
2016-03-21merge from trunkScott Moser
2016-03-21quickly check to see if the previous instance id is still validScott Moser
This adds a check in cloud-init to see if the existing (cached) datasource is still valid. It relies on support from the Datasource to implement 'check_instance_id'. That method should quickly determine (if possible) if the instance id found in the datasource is still valid. This means that we can still notice new instance ids without depending on a network datasource on every boot. I've also implemented check_instance_id for the superclass and for sources: DataSourceAzure (check dmi data) DataSourceConfigDrive (check dmi data) DataSourceNocloud (check the seeded data or kernel command line) DataSourceOpenstack (check dmi data) LP: #1553815
2016-03-21add check_instance_id to ConfigDriveScott Moser
2016-03-21quickly check to see if the previous instance id is still validScott Moser
This adds a check in cloud-init to see if the existing (cached) datasource is still valid. It relies on support from the Datasource to implement 'check_instance_id'. That method should quickly determine (if possible) if the instance id found in the datasource is still valid. This means that we can still notice new instance ids without depending on a network datasource on every boot. I've also implemented check_instance_id for the superclass and for 3 classes: DataSourceAzure (check dmi data) DataSourceOpenstack (check dmi data) DataSourceNocloud (check the seeded data or kernel command line) LP: #1553815
2016-03-21cloud-init-local needs to want network-pre or it isnt guaranteed to startScott Moser
2016-03-20fix creation of network-config-ready and dont bother waiting on loScott Moser
2016-03-20fix syntaxScott Moser
2016-03-18cloud-init-local.service: touch file that cloud-init-wait will wait forScott Moser
this might work. And if it does means we could generally test this as the file that the cloud-init-wait will wait for will actually get created.
2016-03-18remove the 'find_name' function that was here.Scott Moser
I had left this in to commit it, it was my first pass at cloud-init doing the naming itself. That design was then replaced with the idea for cloud-init to instead write systemd.rules files.
2016-03-18commit the systemd waiting mechanismScott Moser
Note, still broken as cloud-init local is not going to ever touch the CI_NET_READY file (/run/cloud-init/network-config-ready). So as this is , it will actually just block for 60 seconds and go on.
2016-03-18add this, its getting moved, but i wanted some of the content storedScott Moser
2016-03-18add atomic_write_file and use it from atomic_write_jsonScott Moser
atomic_write_file just does less and easily utilized for the same purpose that atomic_write_json served.
2016-03-18debian packaging: adjust build-depends for xenialScott Moser
python3 support was moved out of pyflakes into python3-pyflakes. Adjust the package to build on trusty where python3-pyflakes was not present and also on xenial where it is. Note, this does mean that sbuild now requires '--resolve-alternatives'. That is how it is used on launchpad but is not the default in sbuild.
2016-03-17Send proper SUCCESS / FAILED events to the underlying VMware hypervisor.Scott Moser
Added code to customize timezone. Added few utility functions to send events to the VMware hypervisor. Re-factored the code little bit. Added code to send SUCCESS event when customization succeeds. Added code to send FAILED event if any error occurs during customization.
2016-03-16fix regression when command line (ds=nocloud) is presentScott Moser
parsing the command line parameters returned a dictionary but _merge_new_seed was expecting a string to be yaml loaded. Change is to make _merge_new_seed take either string or dict.
2016-03-15 - Added the code to customize timezone.Sankar Tanguturi
2016-03-14fix ssh_pwauth behavior to function as documented.Scott Moser
Add option checking for ssh_pwauth to bring behavior inline with the description cloud-config.txt example. Previously, setting 'ssh_pwauth' to 'unchanged' or '' would result in an empty value for PasswordAuthentication when it should have simply not been modified.
2016-03-14fix long lineScott Moser
2016-03-14merge with trunkScott Moser
2016-03-14doc/ add new logo to rtd (read the docs) docs.Scott Moser
2016-03-14doc: document that volume label must be 'cidata' NocCloud datasource.Scott Moser
2016-03-14merge with trunk for dmidecode changesScott Moser
2016-03-14some systemd cleanupsScott Moser
generator: * write to directory /run/cloud-init/ rather than /run * read from /proc/1/cmdline for the command line if inside a container cloud-init-local.service: now run fully before any networking comes up. cloud-init.service: run before network-online.target and after networking.service. This ends up meaning other things that require network-online.target will run after cloud-init.service, but cloud-init.service will still have networking. The 'networking.service' is ifupdown specific. Further changes would be needed for other networking systems (networkd for example)
2016-03-14change return value for dmi data of all \xff to be ""Scott Moser
Previously we returned a string of "." the same length as the dmi field. That seems confusing to the user as "." would seem like a valid response when in fact this value should not be considered valid. So now, in this case, return empty string.
2016-03-14minor cleanup. long line and remove unused 'local'Scott Moser
2016-03-14strip return of dmidecode and do so before checking for all "."Scott Moser
2016-03-14change where we handle the translationScott Moser
2016-03-14change return value for dmi data of all \xff to be ""Scott Moser
Previously we returned a string of "." the same length as the dmi field. That seems confusing to the user as "." would seem like a valid response when in fact this value should not be considered valid. So now, in this case, return empty string.
2016-03-11 - Fixed few pep8 and flake8 issues.Sankar Tanguturi
- Changed the really long 'from ... import ...' statements.
2016-03-11fix toxScott Moser
2016-03-11minor changes use the helpers in cloudinit/netScott Moser
functional
2016-03-11fix use of network stateScott Moser
2016-03-11- Executed 'bzr merge' and resolved all the conflicts.Sankar Tanguturi
- Now my branch is identical to trunk.dist
2016-03-11merge with trunkScott Moser
2016-03-10commit planned implementation of datasourcenocloudScott Moser
this adds the consumption of 'network-config' to the datasourcenocloud. There is an implementation of the network rendering taht is untested in distros/debian.
2016-03-10dmi data: fix failure of reading dmi data for unset dmi valuesScott Moser
it is not uncommon to find dmi data in /sys full of 'ff'. utf-8 decoding of those would fail, causing warning and stacktrace. Return '.' instead of \xff. This is what dmidecode would return. $ dmidecode --string system-product-name
2016-03-10adjust net to fit with cloudinitScott Moser
at this point, this works: python -m cloudinit.net.network_state examples/network-all.yaml
2016-03-10initial copy of curtin netScott Moser
just add curtin/net as cloudinit/net and then copy curtin/udev.py as cloudinit/net/udev.py
2016-03-10improve commentScott Moser
2016-03-10dmi data: fix failure of reading dmi data for unset dmi valuesScott Moser
it is not uncommon to find dmi data in /sys full of 'ff'. utf-8 decoding of those would fail, causing warning and stacktrace. Return '.' instead of \xff. This maps to what dmidecode would return $ dmidecode --string system-product-name .................................
2016-03-10generator: use /run/cloud-init instead of /runScott Moser
2016-03-10generator: support reading cmdline of pid 1 in a containerScott Moser
This might need cleaning up in the future as I believe in some containers /proc/cmdline is provided, and in that case it would be preferred to pid 1's command line.
2016-03-10initial systemd service suggestions provided by pittiScott Moser
This should mean that cloud-init-local is running earlier now (DefaultDependencies=no). And also blocking networking coming up (Before=network-pre.target) cloud-init.service should now actually block network-online.target from being made (meaning it will run before anything that expects that) but after networking.service, which is what actually does the bringup on ifupdown / ubuntu.
2016-03-09add default user to 'lxd' group and create groups when necessary.Scott Moser
This add 'lxd' to the list of groups that the default user is added to. It also changes behavior to create any necessary groups that are listed for the user rather than failing to add the user. Theres also a fix for usage of logexc that I found along the way. LP: #1539317
2016-03-09 - Fixed few issues with return values form util.subp()Sankar Tanguturi
- Added a new utility method to send a RPC for enabling NICS - Modified DataSourceOVF.py to enable nics. - Executed ./tools/run-pep8 and no issues were reported.
2016-03-09Add default ubuntu user to lxd group (LP: #1539317)Robert Jennings
LP: #1539317
2016-03-08 - Ignored return code 1 for 'pkill' command in config_nic.pySankar Tanguturi
- Added few utility functions to report events to the underlying VMware Virtualization platform - Re-factored code little bit. - Executed ./tools/run-pep8 and no pep8 errors were reported.
2016-03-08No longer run pollinate by default in seed_randomScott Moser
The user can still choose to run pollinate here to seed their random data. And in an environment with network datasource, that would be expected to work. However, we do not want to run it any more from cloud-init because a.) pollinate's own init system jobs should get it ran before ssh, which is the primary purpose of wanting cloud-init to run it. b.) with a local datasource, there is no network guarantee when init_modules run, so pollinate -q would often cause issues then. c.) cloud-init would run pollinate and log the failure causing many cloud-init specific failures that it could do nothing about. Additionally, add documentation for the seed_random config module.