summaryrefslogtreecommitdiff
path: root/cloudinit
AgeCommit message (Collapse)Author
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-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-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.
2016-03-07No 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. LP: #1554152
2016-03-07Implemented review concerning position of try and more information about the ↵Alex Sirbu
caught exception.
2016-03-07Returning false if file does not exist, instead of throwing errorAlex Sirbu
2016-03-07Enable Bigstep data source in default configurationAlex Sirbu
2016-03-04pep8: update formatting to pass pep8 1.4.6 (trusty) and 1.6.2 (xenial)Ryan Harper
make check fails in a trusty sbuild due to different rules on older pep8. Fix formatting to pass in older and newer pep8.
2016-03-04Added Bigstep datasourceDaniel Watkins
2016-03-04Enable password changing via a hashed stringDaniel Watkins
2016-03-04merge with trunkScott Moser
2016-03-04Apply pep8, pyflakes fixes for python2 and 3Scott Moser
Update make check target to run pep8 and run pyflakes or pyflakes3 depending on the value of 'PYVER'. This way the python3 build environment does not need python2 and vice versa. Also have make check run the 'yaml' test. tox: have tox run pep8 in the pyflakes
2016-03-03 Resolved all the pep8 errors.Sankar Tanguturi
Executed ./tools/run-pep8 cloudinit/sources/DataSourceOVF.py and no errors were reported.
2016-03-03Apply pep8, pyflakes fixes for python2 and 3 Ryan Harper
Update make check target to use pep8, pyflakes, pyflakes3.
2016-03-03Fix pyflake/pyflake3 errorsRyan Harper
Now we can run make check to assess pep8, pyflakes for python2 or 3 And execute unittests via nosetests (2 and 3).
2016-03-03Update pep8 runner and fix pep8 issuesRyan Harper
2016-03-03fix some of pylints complaintsScott Moser
2016-03-03fix lxd module to not do anything unless config providedScott Moser
2016-03-03run pyflakes in more places, fix falloutScott Moser
this makes 'make' run pyflakes, so failures there will stop a build. also adds it to tox.
2016-03-02Fix logic error in lxd config checkRyan Harper
If the cloud-config does not contain and lxd dictionary then we should not attempt to install the package. Change the latter half of the check to negate the dictionary type check. This fix prevents us from always installing lxd, rather than only installing when we have a config. Fix pyflakes check on init_cfg dict error message.
2016-03-02Used keyword for parameter in order to make it clearer what it represents.Alex Sirbu
2016-03-02Added the hashed_passwd argument for the function create_user, which uses ↵Alex Sirbu
the already implemented functionality of changing the password with a hashed string, but which wasn't used anywhere.
2016-03-02Pep8 changes to Bigstep datasource.root
2016-03-02Added Bigstep datasource.root
2016-03-01 Added a kill switch for customization on VMware platform.Sankar Tanguturi
The customization is set to False by default and is triggered only when the option disable_vmware_customization is set to false in /etc/cloud/cloud.cfg
2016-03-01timezone: use a symlink when updating /etc/localtimeScott Moser
Unless /etc/localtime is an existing file and not a symlink, then we will symlink instead of copying the tz_file to /etc/localtime. The copy was due to an old bug in Ubuntu, symlink should be preferred. LP: #1543025
2016-03-01Add Image Customization Parser for VMware vSphere Hypervisor Support.Scott Moser
This is the first changeset submitted as a part of project to add cloud-init support for VMware vSphere Hypervisor. This changeset contains _only_ the changes for a simple python parser for a Image Customization Specification file pushed by VMware vSphere hypervisor into the guest VMs. In a later changeset, will be submitting another patch to actually detect the underlying VMware vSphere hypervisor and do the necessary customization.
2016-03-01lxd: general fix after testingScott Moser
A few changes: a.) change to using '--name=value' rather than '--name' 'value' b.) make sure only strings are passed to command (useful for storage_create_loop: which is likely an integer) c.) document simple working example d.) support installing zfs if not present and storage_backedn has it.
2016-02-25merge with trunkScott Moser
2016-02-25minor cleanupsScott Moser
2016-02-18 - Removed dmi_data function.Sankar Tanguturi
- Fixed few variable names. - Used util.subp methods for process related manipulations.
2016-02-16 - Used proper 4 space indentations for config_nic.py and nic.pySankar Tanguturi
- Implemented the 'search_file' function using 'os.walk()' - Fixed few variable names. - Removed size() function in config_file.py - Updated the test_config_file.py to use len() instead of .size()
2016-02-16Handle escaped quotes in WALinuxAgentShim.find_endpointScott Moser
LP: #1488891
2016-02-09 - Added the code to configure the NICs.Sankar Tanguturi
- Added the code to detect VMware Virtual Platform and apply the customization based on the 'Customization Specification File' Pushed into the guest VM.
2016-02-04Merge from trunk and resolve text conflict in ChangeLogWesley Wiedenmeier
2016-02-04 - Ensure that lxd is installed before running lxd init.Wesley Wiedenmeier
- Handle init cfg separately from main cfg to allow multiple sections under lxd config to be handled independantly. - Check for properly formatted lxd init cfg
2016-02-04systemd: support using systemd-detect-virt to detect containerScott Moser
running-in-container is a wrapper around systemd-detect-virt -c, and was removed from ubuntu. This adjusts to run if only running-in-container is available. LP: #1539016
2016-02-04SmartOS: Add support for Joyent LX-Brand Zones (LP: #1540965)Robert Jennings
LX-brand zones on Joyent's SmartOS use a different metadata source (socket file) than the KVM-based SmartOS virtualization (serial port). This patch adds support for recognizing the different flavors of virtualization on SmartOS and setting up a metadata source file object. After the file object is created, the rest of the code for the datasource LP: #1540965
2016-02-03lxd: add support for setting up lxd using 'lxd init'Wesley Wiedenmeier
If lxd key is present in cfg, then run 'lxd init' with values from the 'init' entry in lxd configuration as flags.
2016-01-28Use systemd-detect-virt to detect a container.Martin Pitt
running-in-container is an Ubuntu-ism and going away. LP: #1539016
2016-01-19 Fixed all the review comments from Daniel.Sankar Tanguturi
Added a new file i.e. nic_base.py which will be used a base calls for all NIC related configuration. Modified some code in nic.py.
2016-01-05 Fixed all the styling nits.Sankar Tanguturi
Used proper naming convention for the methods. Added proper documentation. Checked pep8 and flake8 output and no issues were reported.
2015-11-18Add Image Customization Parser for VMware vSphere Hypervisor Support.Sankar Tanguturi
This is the first changeset submitted as a part of project to add cloud-init support for VMware vSphere Hypervisor. This changeset contains _only_ the changes for a simple python parser for a Image Customization Specification file pushed by VMware vSphere hypervisor into the guest VMs. In a later changeset, will be submitting another patch to actually detect the underlying VMware vSphere hypervisor and do the necessary customization.
2015-11-18Azure: get instance id from dmi instead of SharedConfigScott Moser
Replace the use of SharedConfig.xml in both the walinuxagent case, and the case where we communicate with the Azure fabric ourselves. The instance id present in the dmi data is unfortunately different that that in the SharedConfig. This means that something needs to handle migration so that a reboot after newer version is installed will not re-run first instance things. In Ubuntu this is being handled in packaging. LP: #1506187
2015-11-09With Ubuntu 15.10, "nobootwait" != "nofail". The "nobootwait" was an UbuntuBen Howard
specific option. This change was dropped in 15.10 (LP: #1514485).
2015-10-30Use DMI data to find Azure instance IDs.Daniel Watkins
This replaces the use of SharedConfig.xml in both the walinuxagent case, and the case where we communicate with the Azure fabric ourselves.
2015-10-20Remove --quiet option from udevadm in AltCloudDarren Worrall
--quiet is no longer supported LP: #1507526
2015-10-14azure: support extracting SSH key values from ovf-env.xmlScott Moser
Azure has or will be offering shortly the ability to directly define the SSH key value instead of a fingerprint in the ovf-env.xml file. This patch favors defined SSH keys over the fingerprint method (LP: #1506244).
2015-10-14AZURE: support extracting SSH key values from ovf-env.xmlBen Howard
Azure has or will be offering shortly the ability to directly define the SSH key value instead of a fingerprint in the ovf-env.xml file. This patch favors defined SSH keys over the fingerprint method (LP: #1506244).
2015-10-09support configuring and installing the Ubuntu fan driverScott Moser
#cloud-config fan: config: | # fan 240 10.0.0.0/8 eth0/16 dhcp 10.0.0.0/8 eth1/16 dhcp off # fan 241 241.0.0.0/8 eth0/16 dhcp config_path: /etc/network/fan LP: #1504604