summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceAzure.py
Commit message (Collapse)AuthorAgeFilesLines
...
* | Low hanging Python 3 fruit.Barry Warsaw2015-01-221-2/+2
|/
* fix(pep8): Fix various pep8 violations and version-lock pep8Jay Faulkner2014-08-261-2/+2
| | | | | | Fixed all complaints from running "make pep8". Also version locked pep8 in test-requirements.txt to ensure that pep8 requirements don't change without an explicit commit.
* Azure: pep8 and pylint cleanups from previous commit.Scott Moser2014-03-191-16/+10
|
* change to unmount then check to address possible raceScott Moser2014-03-191-1/+12
|
* minor changes: be more careful about umount and warn on failScott Moser2014-03-191-13/+16
|
* Windows Azure defines the ephemeral0 mount as being a per-boot instead ofBen Howard2014-03-181-4/+94
| | | | | | | | | | | | | per instance. Under a variety of circumstances, the ephemeral device may be presented as a default device. This patch detects when that situation happens and triggers CC modules disk-setup and mounts to run again. Details of changes for cloudinit/sources/DataSourceAzure.py: - auto-detect the location of ephemeral0 - check each boot if ephemeral0 is new - done via NTFS w/ label of "Temporary Storage" w/ no files on it - if device is mounted, datasource will unmount it - if is new, change mounts and disk-setup to always for that boot only
* make a defined var of DATA_DIR_CLEAN_LIST, some pylint cleanupsScott Moser2014-02-101-9/+9
|
* change behavior to only delete SharedConfig.xml.Scott Moser2014-02-101-13/+20
|
* Made new ovf-env.xml handling more robust. Test cases includedBen Howard2014-02-071-6/+10
|
* Fix for race condition where 'captured' Windows Azure instances identifyBen Howard2014-01-151-0/+6
| | | | as the previous instance (LP: #1269626).
* Azure: minor changes for filename as strings and logging.Scott Moser2014-01-091-2/+2
| | | | | | | | | We were passing a unicode string to 'runcmd' in the path to the .crt file. That is because the keyname was coming from ovf file as unicode. Ie: u'/var/lib/waagent/6BE7A7C3C8A8F4B123CCA5D0C2F1BE4CA7B63ED7.crt' Then, logging was extending not appending errors.
* fix DataSourceAzure incompatibility with 2.6Scott Moser2013-10-171-1/+1
| | | LP: #1232175
* Moved ephemeralX.Y handling from Datasource into the cc_disk_setup, which ↵Ben Howard2013-10-031-3/+1
| | | | makes it cloud agnostic.
* Added ability to define disks via 'ephemeralX.Y'.Ben Howard2013-10-021-3/+6
| | | | | | Modified cc_mounts to identify whether ephermalX is partitioned. Changed datasources for Azure and SmartOS to use 'ephemeralX.Y' format. Added disk remove functionally
* azure data source 'ephemeral0' point to '/dev/sdb', not /dev/sdb1Scott Moser2013-09-271-1/+1
| | | | | in general block device mappings should be to block devices, not partitoins.
* fix tests small other changesScott Moser2013-09-271-2/+2
| | | | | | | | | | | | | | | | | Also * cloudinit/sources/DataSourceAzure.py: invalid xml in a file called 'ovfenv.xml' should raise BrokenAzureDatasource rather than NonAzureDataSource * cloudinit/sources/DataSourceSmartOS.py: cloudinit/sources/DataSourceAzure.py use 'ephemeral0' as the device name in builtin fs_setup * tests/unittests/test_datasource/test_azure.py: * always patch 'list_possible_azure_ds_devs' as it calls find_devs_with which calls blkid, and dramatically was slowing down tests on my system. * test_user_cfg_set_agent_command_plain: fix this test to not depend on specific format of yaml.dumps(). * test_userdata_arrives: add a test that user-data makes it through
* re-work 'ephemeral_disk' and location of builtin configScott Moser2013-09-261-16/+8
| | | | | | | | | | | | | | | | | Previously we had this 'ephemeral_disk' entry in the datasource config for Azure, and then we also copied some entries into the .cfg for that datasource from the datasource config. Ie, datasource['Azure']['disk_setup'] would be oddly copied into the .cfg object that was returned by 'get_config_obj' Now, instead, we have a BUILTIN_CLOUD_CONFIG, which has those same values in it. The other change here is that 'ephemeral_disk' now has no meaning. Instead, we add a populated-by-default entry 'disk_aliases' to the BUILTIN_DS_CFG, and then just return entries in it for 'device_name_to_device'
* fix pep8Scott Moser2013-09-261-1/+0
|
* Added support for formating the ephemeral disk on Windows Azure.Ben Howard2013-09-261-2/+25
|
* populate random_seed in azure data sourceScott Moser2013-09-091-7/+4
| | | | | Azure provides a random bit of data at '/sys/firmware/acpi/tables/OEM0'. The walinux calls this "Entropy in ACPI table provided by Hyper-V".
* add support for reading random_seed on azure also.Scott Moser2013-09-091-0/+8
|
* fix bad arguments to subp inside of apply_hostname_bounceScott Moser2013-08-201-1/+1
| | | | | | This simply correctly invokes subp through util.log_time. The arguments to subp is named 'args' not 'command'. LP: #1214541
* do not set 'password', but set 'passwd' to crypt'd valueScott Moser2013-08-151-1/+6
| | | | | | | | | | | 'password' was the wrong key. It should have been setting the default user's "plain_text_password". Instead of doing that, though, we're encrypting the value and putting it in 'passwd', which will then be passed on to useradd. The key value in doing this is that the plain text password will not be stored in obj.pkl. (admittedly it is still in plain text in the ovf-env.xml file).
* set reading /proc/uptime to false by default.Scott Moser2013-07-301-2/+3
| | | | | reading /proc/uptime is going to be slower, and no reason to do it on most things. Better to only do it when you suspect maybe a need for it.
* add util.log_time helperScott Moser2013-07-301-8/+6
| | | | | | | | | | The reason for this is that more and more things I was wanting to be able to see how long they took. This puts that time logic into a single place. It also supports (by default) reading from /proc/uptime as the timing mechanism. While that is almost certainly slower than time.time(), it does give millisecond granularity and is not affected by 'ntpdate' having run in between the two events.
* DataSourceAzure: do not capture output of bounce commandScott Moser2013-07-291-2/+4
| | | | | | | | | As shown in comments of bug 1202758 and filing of ntp bug 1206164, waiting for the output of this command causes us to wait for ntpdate to fully finish. Ideally I think we'd disable ntpdate running on this run, but that is not trivially possible.
* azure: fix bouncing of interfaceScott Moser2013-07-261-3/+14
| | | | | the environment that was set up to include 'interface' was not actually being passed on to 'subp', so when the command ran it wasn't available.
* minor azure cleanupScott Moser2013-07-251-1/+1
|
* azure: support bouncing interfaces to publish new hostnameScott Moser2013-07-251-26/+88
| | | | | | | | | | See the added doc/sources/azure/README.rst for why this is necessary. Essentially, we now are doing the following in the get_data() method of azure datasource to publish this NewHostname: hostname NewHostName ifdown eth0; ifup eth0 LP: #1202758
* on azure datasource, grab use Deployment as the instance-idScott Moser2013-07-231-1/+43
| | | LP: #1204190
* Azure: make /var/lib/waagent with 0700 permsScott Moser2013-07-171-2/+5
| | | | | | | The walinux agent expects that the files it writes with 0644 (default umask) permissions are not globally readable. Since we were creating the directory for it, and using default umaks (0755), the files inside were readable to non-priviledged users.
* DataSourceAzure: fix inverted logic on DisablesshPasswordAuthenticationBen Howard2013-07-171-1/+1
|\ | | | | | | | | | | DisablesshPasswordAuthentication == True means that ssh_pwauth should be disabled rather than enabled. LP: #1201969
| * Use the inverse of DisableSshPasswordAuthentication for ssh_pwauth.Ben Howard2013-07-161-1/+4
|/ | | | (LP: 1201969)
* DataSourceAzure.py: allow 'customdata' to be the name for userdataScott Moser2013-07-111-3/+10
| | | | | Also, fix a comment and write a log message on how long we waited for the files to appear.
* add waiting for files and reading of crt keysScott Moser2013-07-101-1/+45
|
* build up the 'wait_for' list including fingerprint.crt filesScott Moser2013-07-091-0/+6
|
* fill out load_azure_ovf_pubkeysScott Moser2013-07-091-2/+38
| | | | | | | | | now if there are pubkeys, the cfg['_pubkeys'] entry will have a list of dicts where each dict has 'fingerprint' and 'path' entries. The next thing to do is to block waiting for the <fingerprint>.crt files to appear in /var/lib/waagent.
* mention using cachedScott Moser2013-07-091-0/+3
|
* search in the default storage directory for cached ovf-env.xmlScott Moser2013-07-091-1/+12
| | | | | since azure ejects the disk on reboot, we need to look there to find this datasource.
* populate /var/lib/waagent with ovf-env.xmlScott Moser2013-07-091-12/+31
| | | | | this will copy the ovf-env.xml file that was found to the configured directory (default /var/lib/waagent)
* better handling for user/passwordScott Moser2013-07-091-1/+20
|
* add stub for ssh keysScott Moser2013-07-091-0/+14
| | | | | | | | The idea is that in the future, the DataSources get_data could check to see if there were ssh keys provided. if there were, it could poll and wait (or inotify) until the <fp>.crt files appeared in the /var/lib/walinux directory. Once they did, it'd populate the metadata's public keys.
* add some unit tests, fix things found by doing soScott Moser2013-07-091-6/+20
|
* commit dev stateScott Moser2013-07-081-0/+205