<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/cloudinit/reporting, branch 20.3</title>
<subtitle> (mirror of https://github.com/marekm72/vyos-cloud-init.git)
</subtitle>
<id>https://git.amelek.net/marekm72/vyos-cloud-init.git/atom?h=20.3</id>
<link rel='self' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/atom?h=20.3'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/'/>
<updated>2020-08-20T19:04:03+00:00</updated>
<entry>
<title>Pushing cloud-init log to the KVP (#529)</title>
<updated>2020-08-20T19:04:03+00:00</updated>
<author>
<name>Moustafa Moustafa</name>
<email>momousta@microsoft.com</email>
</author>
<published>2020-08-20T19:04:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=d941c7f7846e0216873384044d20f4b6723697c5'/>
<id>urn:sha1:d941c7f7846e0216873384044d20f4b6723697c5</id>
<content type='text'>
Push the cloud-init.log file (Up to 500KB at once) to the KVP before reporting ready to the Azure platform.
Based on the analysis done on a large sample of cloud-init.log files, Here's the statistics collected on the log file size:
P50 	P90 	P95 	P99 	P99.9 	P99.99
137K 	423K 	537K 	3.5MB 	6MB 	16MB

This change limits the size of cloud-init.log file data that gets dumped to KVP to 500KB. So for ~95% of the cases, the whole log file will be dumped and for the remaining ~5%, we will get the last 500KB of the cloud-init.log file.
To asses the performance of the 500KB limit, 250 VM were deployed with a 500KB cloud-init.log file and the time taken to compress, encode and dump the entries to KVP was measured. Here's the time in milliseconds percentiles:
P50 	P99 	P999
75.705 	232.701 	1169.636

Another 250 VMs were deployed with this logic dumping their normal cloud-init.log file to KVP, the same timing was measured as above. Here's the time in milliseconds percentiles:
P50 	P99 	P999
1.88 	5.277 	6.992

Added excluded_handlers to the report_event function to be able to opt-out from reporting the events of the compressed cloud-init.log file to the cloud-init.log file.

The KVP break_down logic had a bug, where it will reuse the same key for all the split chunks of KVP which results in overwriting the split KVPs by the last one when consumed by Hyper-V. I added the split chunk index as a differentiator to the KVP key.

The Hyper-V consumes the KVPs from the KVP file as chunks whose key is 512KB and value is 2048KB but the Azure platform expects the value to be 1024KB, thus I introduced the Azure value limit.</content>
</entry>
<entry>
<title>cloudinit: remove global disable of pylint W0107 and fix errors (#489)</title>
<updated>2020-07-15T14:26:12+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-07-15T14:26:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=4fe576516d65feda17ba78e9265a8e494a195e7b'/>
<id>urn:sha1:4fe576516d65feda17ba78e9265a8e494a195e7b</id>
<content type='text'>
* cloudinit: remove global disable of pylint W0107 and fix errors

This includes removing a test class which contained no tests but wasn't
detected as empty because of an errant pass statement.

* .pylintrc: update disable comment to match arguments</content>
</entry>
<entry>
<title>test: fix all flake8 E126 errors (#425)</title>
<updated>2020-06-10T14:39:29+00:00</updated>
<author>
<name>Joshua Powers</name>
<email>josh.powers@canonical.com</email>
</author>
<published>2020-06-10T14:39:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=f3bd42659efeed4b092ffcdfd5df7f24813f2d3e'/>
<id>urn:sha1:f3bd42659efeed4b092ffcdfd5df7f24813f2d3e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>test: fix all flake8 E121 and E123 errors (#404)</title>
<updated>2020-06-02T16:06:07+00:00</updated>
<author>
<name>Joshua Powers</name>
<email>josh.powers@canonical.com</email>
</author>
<published>2020-06-02T16:06:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=d53921ea3396c8301c65cad3abf04b4542d4b7a0'/>
<id>urn:sha1:d53921ea3396c8301c65cad3abf04b4542d4b7a0</id>
<content type='text'>
This fixes issues with closing brackets not matching the opening
bracket's line and continuation line under-idented for hanging indent.</content>
</entry>
<entry>
<title>Start removing dependency on six (#178)</title>
<updated>2020-01-21T22:15:30+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-01-21T22:15:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=8c4fd886931abcf2cc8627a47463907d655b35c3'/>
<id>urn:sha1:8c4fd886931abcf2cc8627a47463907d655b35c3</id>
<content type='text'>
* url_helper: drop six

* url_helper: sort imports

* log: drop six

* log: sort imports

* handlers/__init__: drop six

* handlers/__init__: sort imports

* user_data: drop six

* user_data: sort imports

* sources/__init__: drop six

* sources/__init__: sort imports

* DataSourceOVF: drop six

* DataSourceOVF: sort imports

* sources/helpers/openstack: drop six

* sources/helpers/openstack: sort imports

* mergers/m_str: drop six

This also allowed simplification of the logic, as we will never
encounter a non-string text type.

* type_utils: drop six

* mergers/m_dict: drop six

* mergers/m_list: drop six

* cmd/query: drop six

* mergers/__init__: drop six

* net/cmdline: drop six

* reporting/handlers: drop six

* reporting/handlers: sort imports
</content>
</entry>
<entry>
<title>reporting: Using a uuid to enforce uniqueness on the KVP keys.</title>
<updated>2019-11-08T21:02:07+00:00</updated>
<author>
<name>momousta</name>
<email>momousta</email>
</author>
<published>2019-11-08T21:02:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=92cc71dec8da73bf43d345418b73db1a32a6b8b9'/>
<id>urn:sha1:92cc71dec8da73bf43d345418b73db1a32a6b8b9</id>
<content type='text'>
The KVPs currently being emitted to the .kvp_pool file can have
duplicate keys which is wrong since these keys should be unique.
The situation can occur if for example one azure function
called twice or more and this function is reporting telemetry
through the use of KVPs. Any KVP consumer can get confused by
the duplicate keys and a race condition can and have occurred.
</content>
</entry>
<entry>
<title>Azure: Changes to the Hyper-V KVP Reporter</title>
<updated>2019-04-29T20:22:16+00:00</updated>
<author>
<name>Anh Vo</name>
<email>anhvo@microsoft.com</email>
</author>
<published>2019-04-29T20:22:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=86674f013dfcea3c075ab41373ffb475881066f6'/>
<id>urn:sha1:86674f013dfcea3c075ab41373ffb475881066f6</id>
<content type='text'>
 + Truncate KVP Pool file to prevent stale entries from
   being processed by the Hyper-V KVP reporter.
 + Drop filtering of KVPs as it is no longer needed.
 + Batch appending of existing KVP entries.
</content>
</entry>
<entry>
<title>hyperv_reporting_handler: simplify threaded publisher</title>
<updated>2018-08-31T21:47:18+00:00</updated>
<author>
<name>Ryan Harper</name>
<email>ryan.harper@canonical.com</email>
</author>
<published>2018-08-31T21:47:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=43e51a04515686a15c410d1a16dd5ff06fd1afd4'/>
<id>urn:sha1:43e51a04515686a15c410d1a16dd5ff06fd1afd4</id>
<content type='text'>
Switch the implementation to a daemon thread which uses a
blocking get from the Queue.  No additional locking or flag checking
is needed since the Queue itself handles acquiring the lock as needed.
cloud-init only has a single producer (the main thread calling publish)
and the consumer will read all events in the queue and write them out.

Using the daemon mode of the thread handles flushing the queue on
main exit in python3; in python2.7 we handle the EOFError that results
when the publish thread calls to get() fails indicating the main thread
has exited.

The result is that the handler is no longer spawing a thread on each
publish event but rather creates a single thread when we start up
the reporter and we remove any additional use of separate locks and
flags as we only have a single Queue object and we're only calling
queue.put() from main thread and queue.get() from consuming thread.
</content>
</entry>
<entry>
<title>logging: Add logging config type hyperv for reporting via Azure KVP</title>
<updated>2018-08-24T22:25:37+00:00</updated>
<author>
<name>Andy Liu</name>
<email>andyliuliming@outlook.com</email>
</author>
<published>2018-08-24T22:25:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=2320c3de2712c2f320b0d8af4aa129219cc2ad04'/>
<id>urn:sha1:2320c3de2712c2f320b0d8af4aa129219cc2ad04</id>
<content type='text'>
Linux guests can provide information to Hyper-V hosts via KVP.
KVP allows the guests to provide any string key-value-pairs back to the
host's registry. On linux, kvp communication pools are presented as pool
files in /var/lib/hyperv/.kvp_pool_#.

The following reporting configuration can enable this kvp reporting in
addition to default logging if the pool files exist:

reporting:
    logging:
        type: log
    telemetry:
        type: hyperv
</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/marekm72/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>
</feed>
