<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/cloudinit/cmd/tests, branch crux</title>
<subtitle> (mirror of https://github.com/vyos/vyos-cloud-init.git)
</subtitle>
<id>https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=crux</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=crux'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/'/>
<updated>2018-10-30T20:02:38+00:00</updated>
<entry>
<title>query: better error when missing read permission on instance-data</title>
<updated>2018-10-30T20:02:38+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2018-10-30T20:02:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=d74d3f0ff5c8d453f626b113f4e6065322f822fa'/>
<id>urn:sha1:d74d3f0ff5c8d453f626b113f4e6065322f822fa</id>
<content type='text'>
Emit a permissions error instead of "Missing instance-data.json" when
non-root user doesn't have read-permission on
/run/cloud-init/instance-data.json
</content>
</entry>
<entry>
<title>instance-data: fallback to instance-data.json if sensitive is absent.</title>
<updated>2018-10-26T03:49:57+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2018-10-26T03:49:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=dc0be9c56f78537f1808934d26f5aa0868ae7842'/>
<id>urn:sha1:dc0be9c56f78537f1808934d26f5aa0868ae7842</id>
<content type='text'>
On cloud-init upgrade path from 18.3 to 18.4 cloud-init changed how
instance-data is written. Cloud-init changes instance-data.json from root
read-only to redacted world-readable content, and provided a separate
unredacted instance-data-sensitive.json which is read-only root.
Since instance-data is only rewritten from cache on
reboot, the query and render tools needed fallback to use the 'old'
instance-data.json if the new sensitive file isn't yet present.

This avoids error messages from tools about an absebt
/run/instance-data-sensitive.json file.

LP: #1798189
</content>
</entry>
<entry>
<title>tools: Add cloud-id command line utility</title>
<updated>2018-10-09T22:19:20+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2018-10-09T22:19:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=6ee8a2c557ccdc8be54bcf8a8762800c10f3ef49'/>
<id>urn:sha1:6ee8a2c557ccdc8be54bcf8a8762800c10f3ef49</id>
<content type='text'>
Add a quick cloud lookup utility in order to more easily determine
the cloud on which an instance is running.

The utility parses standardized attributes from
/run/cloud-init/instance-data.json to print the canonical cloud-id
for the instance. It uses known region maps if necessary to determine
on which specific cloud the instance is running.

Examples:
aws, aws-gov, aws-china, rackspace, azure-china, lxd, openstack, unknown
</content>
</entry>
<entry>
<title>cli: add cloud-init query subcommand to query instance metadata</title>
<updated>2018-09-25T21:59:16+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2018-09-25T21:59:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=fc4b966ba928b30b1c586407e752e0b51b1031e8'/>
<id>urn:sha1:fc4b966ba928b30b1c586407e752e0b51b1031e8</id>
<content type='text'>
Cloud-init caches any cloud metadata crawled during boot in the file
/run/cloud-init/instance-data.json. Cloud-init also standardizes some of
that metadata across all clouds. The command 'cloud-init query' surfaces a
simple CLI to query or format any cached instance metadata so that scripts
or end-users do not have to write tools to crawl metadata themselves.

Since 'cloud-init query' is runnable by non-root users, redact any
sensitive data from instance-data.json and provide a root-readable
unredacted instance-data-sensitive.json. Datasources can now define a
sensitive_metadata_keys tuple which will redact any matching keys
which could contain passwords or credentials from instance-data.json.

Also add the following standardized 'v1' instance-data.json keys:
  - user_data: The base64encoded user-data provided at instance launch
  - vendor_data: Any vendor_data provided to the instance at launch
  - underscore_delimited versions of existing hyphenated keys:
    instance_id, local_hostname, availability_zone, cloud_name
</content>
</entry>
<entry>
<title>Fall back to root:root on syslog permissions if other options fail.</title>
<updated>2018-09-17T13:07:39+00:00</updated>
<author>
<name>Robert Schweikert</name>
<email>rjschwei@suse.com</email>
</author>
<published>2018-09-17T13:07:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=c714651c1988a17f457426de63cdb8514d5a81b4'/>
<id>urn:sha1:c714651c1988a17f457426de63cdb8514d5a81b4</id>
<content type='text'>
If the user has removed the default configuration file or does
not set the syslog_fix_perms config option the user still ends
up with a warning on SUSE distributions.  Add root:root to the
default builtin config.
</content>
</entry>
<entry>
<title>tests: Disallow use of util.subp except for where needed.</title>
<updated>2018-09-05T16:02:25+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@ubuntu.com</email>
</author>
<published>2018-09-05T16:02:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=a8dcad9ac62bb1d2a4f7489960395bad6cac9382'/>
<id>urn:sha1:a8dcad9ac62bb1d2a4f7489960395bad6cac9382</id>
<content type='text'>
In many cases, cloud-init uses 'util.subp' to run a subprocess.
This is not really desirable in our unit tests as it makes the tests
dependent upon existance of those utilities.

The change here is to modify the base test case class (CiTestCase) to
raise exception any time subp is called.  Then, fix all callers.
For cases where subp is necessary or actually desired, we can use it
via
  a.) context hander CiTestCase.allow_subp(value)
  b.) class level self.allowed_subp = value

Both cases the value is a list of acceptable executable names that
will be called (essentially argv[0]).

Some cleanups in AltCloud were done as the code was being updated.
</content>
</entry>
<entry>
<title>pylint: pay attention to unused variable warnings.</title>
<updated>2018-04-20T03:30:08+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@ubuntu.com</email>
</author>
<published>2018-04-20T03:30:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=1081962eacf2814fea6f4fa3255c530de14e4a24'/>
<id>urn:sha1:1081962eacf2814fea6f4fa3255c530de14e4a24</id>
<content type='text'>
This enables warnings produced by pylint for unused variables (W0612),
and fixes the existing errors.
</content>
</entry>
<entry>
<title>set_hostname: When present in metadata, set it before network bringup.</title>
<updated>2018-03-15T05:38:07+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2018-03-15T05:38:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=133ad2cb327ad17b7b81319fac8f9f14577c04df'/>
<id>urn:sha1:133ad2cb327ad17b7b81319fac8f9f14577c04df</id>
<content type='text'>
When instance meta-data provides hostname information, run
cc_set_hostname in the init-local or init-net stage before network
comes up.

Prevent an initial DHCP request which leaks the stock cloud-image default
hostname before the meta-data provided hostname was processed.
A leaked cloud-image hostname adversely affects Dynamic DNS which
would reallocate 'ubuntu' hostname in DNS to every instance brought up by
cloud-init. These instances would only update DNS to the cloud-init
configured hostname upon DHCP lease renewal.

This branch extends the get_hostname methods in datasource, cloud and
util to limit results to metadata_only to avoid extra cost of querying
the distro for hostname information if metadata does not provide that
information.

LP: #1746455
</content>
</entry>
<entry>
<title>tests: run nosetests in cloudinit/ directory, fix py26 fallout.</title>
<updated>2018-02-12T20:54:50+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@ubuntu.com</email>
</author>
<published>2018-02-12T20:54:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=754f54037aca0f604b8b57ab71b30dad5e5066cf'/>
<id>urn:sha1:754f54037aca0f604b8b57ab71b30dad5e5066cf</id>
<content type='text'>
When we moved some tests to live under cloudinit/ we inadvertantly
failed to change all things that would run nose to include that
directory.

This changes all the 'nose' invocations to consistently run with
tests/unittests and cloudinit/.

Also, it works around, more correctly this time, a python2.6-ism with
the following code:
   with assertRaises(SystemExit) as cm:
      sys.exit(2)
</content>
</entry>
<entry>
<title>cli: fix cloud-init status to report running when before result.json</title>
<updated>2018-02-09T03:57:23+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2018-02-09T03:57:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=86d2fc7f515f70a5117f00baf701a0bed6310b3e'/>
<id>urn:sha1:86d2fc7f515f70a5117f00baf701a0bed6310b3e</id>
<content type='text'>
Fix various corner cases for cloud-init status subcommand. Report
'runnning' under the following conditions:
 - No /run/cloud-init/result.json file exists
 - Any stage in status.json is unfinished
 - status.json reports a non-null stage it is in progress on

LP: #1747965
</content>
</entry>
</feed>
