summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2021-06-16Small Doc Update for ReportEventStack and Test (#920)Mike Russell
- small document update for ReportEventStack explaining post_files parameter - small unit test for test_reporting demonstrating the close of an event with optional post_files list
2021-06-03build-on-netbsd: don't pin a specific py3 version (#913)Gonéri Le Bouder
Reuse the FreeBSD logic to be able to switch between Python3 versions easily.
2021-05-25Add Rocky Linux support to cloud-init (#906)Louis Abel
Rocky Linux is a RHEL-compatible distribution so all changes that have been made should be trivial.
2021-05-21Add "esposem" as contributor (#907)Emanuele Giuseppe Esposito
2021-05-14[examples] config-user-groups expire in the future (#902)Geert Stappers
Changed year 2012 into 2032
2021-05-07Add AlmaLinux OS support (#872)Andrew Lukoshko
AlmaLinux OS is RHEL-compatible so all the changes needed are trivial.
2021-04-29Add Vultaire as contributor (#881)Paul Goins
2021-04-26Fix chef module run failure when chef_license is set (#868)Ben Hughes
Move chef_license from TPL_PATH_KEYS to TPL_KEYS as the chef license setting is not a path but must be added to the client config template. Fixes file or folder not found exception raised from ensure_dirs.
2021-04-22Use `partprobe` to re-read partition table if available (#856)Nicolas Bock
The blkdev command is fragile re-reading partition tables if a partition is mounted. This change instead uses the partprobe if it is available. LP: #1920939
2021-04-13Add Vultr support (#827)David Dymko
This PR adds in support so that cloud-init can run on instances deployed on Vultr cloud. This was originally brought up in #628. Co-authored-by: Eric Benner <ebenner@vultr.com>
2021-04-07lp-to-git-users: adding B1Sandmann (#828)Jens Sandmann
2021-04-07bringup_static_routes: fix gateway check (#850)Petr Fedchenkov
When bringing up DHCP-provided static routes, we check for "0.0.0.0/0" to indicate an unspecified gateway. However, when parsing the static route in `parse_static_routes`, the gateway is never specified with a net length, so the "/0" will never happen. This change updates the gateway check to check only for "0.0.0.0".
2021-03-30add hamalq user (#860)hamalq
2021-03-25tools/write-ssh-key-fingerprints: do not display empty header/footer (#817)dermotbradley
When output of SSH host keys and/or SSH fingerprints are disabled for all keys do not display headers and footers. Prevent risk of message text being interpreted as "logger" option by appending "--" to logger options. Correct syslog output that was tagged with "ec2" regardless of DataSource in use. Now use "cloud-init" tag instead. Various "shellcheck" corrections. Add testcase for disabled output of SSH host keys.
2021-03-24Fix chef apt source example (#826)timothegenzmer
key is a property of source1 and not sources
2021-03-16Fix stack trace if vendordata_raw contained an array (#837)eb3095
The implementation in existing datasources means that vendordata_raw is not "raw" as it ideally would be. Instead, actual values may include bytes, string or list. If the value was a list, then the attempt to persist that data to a file in '_store_rawdata' would raise a TypeError. The change is to encode with util.json_dumps (which is safe for binary data) before writing.
2021-02-25archlinux: Use hostnamectl to set the transient hostname (#797)Kristian Klausen
hostname (inetutils) isn't installed per default on arch, so switch to hostnamectl which is installed per default (systemd).
2021-02-23Update cc_set_hostname documentation (#818)Toshi Aoyama
It is distro dependent whether hostname or fqdn is used
2021-02-08Datasource for UpCloud (#743)Antti Myyrä
New datasource utilizing UpCloud metadata API, including relevant unit tests and documentation.
2021-01-26Add jordimassaguerpla as contributor (#787)Jordi Massaguer Pla
Signed-off-by: Jordi Massaguer Pla <jmassaguerpla@suse.de>
2021-01-26Add Rick Harding to CLA signers (#792)Rick Harding
2021-01-21Adding self to cla signers (#776)Andrew Bogott
2021-01-21doc: avoid two warnings (#781)Dan Kenigsberg
Two shell code blocks are not marked as such, confusing rst to consider them as yaml. Be explicit about their syntax, and use $ prompt to match elsewhere in the docs. /home/travis/build/canonical/cloud-init/doc/rtd/topics/format.rst:28: WARNING: Could not lex literal_block as "yaml". Highlighting skipped. /home/travis/build/canonical/cloud-init/doc/rtd/topics/format.rst:52: WARNING: Could not lex literal_block as "yaml". Highlighting skipped. Signed-off-by: Dan Kenigsberg <danken@redhat.com>
2021-01-19Add antonyc to .github-cla-signers (#747)Anton Chaporgin
2021-01-13net: Fix static routes to host in eni renderer (#668)Pavel Abalikhin
Route '-net' parameter is incompatible with /32 IPv4 addresses so we have to use '-host' in that case.
2021-01-12archlinux: fix package upgrade command handling (#768)Bao Trinh
pacman uses `-u` instead of `upgrade` to trigger a system upgrade, fix the command handling so this is properly accounted for. as is, the resulting command attempts to install a (non-existent) `upgrade` package Co-authored-by: Rick Harding <rharding@mitechie.com>
2021-01-08Add ajmyyra as contributor (#742)Antti Myyrä
2021-01-06fix a typo in man page cloud-init.1 (#752)Amy Chen
1. fix a typo in cloud-init.1 2. add xiachen-rh as contributor
2020-12-17cc_ca_certs: add RHEL support (#633)cawamata
This refactors cc_ca_certs to support non-ca-certificates distros, and adds RHEL support.
2020-12-16doc: fix CloudStack configuration example (#707)Olivier Lemasle
This commit removes lines which are invalid configuration.
2020-11-25cla: add xnox (#692)Dimitri John Ledkov
2020-11-23Ability to hot-attach NICs to preprovisioned VMs before reprovisioning (#613)aswinrajamannar
Adds the ability to run the Azure preprovisioned VMs as NIC-less and then hot-attach them when assigned for reprovision. The NIC on the preprovisioned VM is hot-detached as soon as it reports ready and goes into wait for one or more interfaces to be hot-attached. Once they are attached, cloud-init gets the expected number of NICs (in case there are more than one) that will be attached from IMDS and waits until all of them are attached. After all the NICs are attached, reprovision proceeds as usual.
2020-11-20Support configuring SSH host certificates. (#660)Jonathan Lung
Existing config writes keys to /etc/ssh after deleting files matching a glob that includes certificate files. Since sshd looks for certificates in the same directory as the keys, a host certificate must be placed in this directory. This update enables the certificate's contents to be specified along with the keys. Co-authored-by: jonathan lung <lungj@heresjono.com> Co-authored-by: jonathan lung <jlung@kepler.space>
2020-11-17add --no-tty option to gpg (#669)Till Riedel
Make sure that gpg works even if the instance has no /dev/tty. This has been observed on Debian. LP: #1813396
2020-11-06replace usage of dmidecode with kenv on FreeBSD (#621)Mina Galić
FreeBSD lets us read out kernel parameters with kenv(1), a user-space utility that's shipped in "base" We can use it in place of dmidecode(8), thus removing the dependency on sysutils/dmidecode, and the restrictions to i386 and x86_64 architectures that this utility imposes on FreeBSD. Co-authored-by: Scott Moser <smoser@brickies.net>
2020-11-04split read_fs_info into linux & freebsd parts (#625)Mina Galić
FreeBSD doesn't have blkid, so we want to use geom to list devices and their fstypes and labels. This PR also adds `jail` to the list of is_container() And we now also properly cache geom and blkid output! A test is added to verify the new behaviour by correctly identifying NoCloud on FreeBSD. Co-authored-by: Scott Moser <smoser@brickies.net>
2020-11-03Make some language improvements in growpart documentation (#649)Shane Frasier
* Fix awkward English in sentence * Add the missing word "the" * Fix misspelling * Add @jsf9k as a contributor Co-authored-by: Rick Harding <rharding@mitechie.com>
2020-11-03Fix not sourcing default 50-cloud-init ENI file on Debian (#598)WebSpider
* Include both Ubuntu-style cfg file, and Debian-style directory in ENI * Add WebSpider as contributor
2020-10-29tools/build-on-freebsd: fix comment explaining purpose of the script (#635)Mina Galić
Since there is now an official port for cloud-init in FreeBSD, this script has a different purpose. It's an interface between cloud-init maintainers, and the FreeBSD port maintainers for quickly seeing which dependencies have changed.
2020-10-29get_interfaces: don't exclude Open vSwitch bridge/bond members (#608)Lukas Märdian
If an OVS bridge was used as the only/primary interface, the 'init' stage failed with a "Not all expected physical devices present" error, leaving the system with a broken SSH setup. LP: #1898997
2020-10-28Add config modules for controlling IBM PowerVM RMC. (#584)Aman306
Reliable Scalable Cluster Technology (RSCT) is a set of software components that together provide a comprehensive clustering environment(RAS features) for IBM PowerVM based virtual machines. RSCT includes the Resource Monitoring and Control (RMC) subsystem. RMC is a generalized framework used for managing, monitoring, and manipulating resources. RMC runs as a daemon process on individual machines and needs creation of unique node id and restarts during VM boot. LP: #1895979 Co-authored-by: Scott Moser <smoser@brickies.net>
2020-10-28lp-to-git-users: adding asciiprod (#629)Markus Schade
Mapped from lp-markusschade
2020-10-27gentoo: fix hostname rendering when value has a comment (#611)Manuel Aguilera
Gentoo's hostname file format instead of being just the host name is hostname=thename". The old code works fine when the file has no comments but if there is a comment the line ``` gentoo_hostname_config = 'hostname="%s"' % conf ``` can render an invalid hostname file that looks similar to ``` hostname="#This is the host namehello" ``` The fix inserts the hostname in a gentoo friendly way so that it gets handled by HostnameConf as a whole and comments are handled and preserved
2020-10-15openstack: consider product_name as valid chassis tag (#580)Adrian Vladu
Consider valid product names as valid chassis asset tags when detecting OpenStack platform before crawling for OpenStack metadata. As `ds-identify` tool uses product name as valid chassis asset tags, let's replicate the behaviour in the OpenStack platform detection too. This change should be backwards compatible and a temporary fix for the current limitations on the OpenStack platform detection. LP: #1895976
2020-09-15create a shutdown_command method in distro classes (#567)Emmanuel Thomé
Under FreeBSD, we want to use "shutdown -p" for poweroff. Alpine Linux also has some specificities. We choose to define a method that returns the shutdown command line to use, rather than a method that actually does the shutdown. This makes it easier to have the tests in test_handler_power_state do their verifications. Two tests are added for the special behaviours that are known so far.
2020-09-08Add jqueuniet as contributor (#569)Johann Queuniet
2020-08-25tox: bump the pylint version to 2.6.0 in the default run (#544)Paride Legovini
Changes: tox: bump the pylint version to 2.6.0 in the default run Fix pylint 2.6.0 W0707 warnings (raise-missing-from)
2020-08-21Update the list of valid ssh keys. (#487)Ole-Martin Bratteng
Update ssh_util.py with latest list of keys (from openssh-8.3p1/sshkey.c), Added keys: sk-ecdsa-sha2-nistp256-cert-v01@openssh.com sk-ecdsa-sha2-nistp256@openssh.com sk-ssh-ed25519-cert-v01@openssh.com sk-ssh-ed25519@openssh.com ssh-xmss-cert-v01@openssh.com ssh-xmss@openssh.com LP: #1877869
2020-08-19Add Alpine Linux support. (#535)dermotbradley
Add new module cc_apk_configure for creating Alpine /etc/apk/repositories file. Modify cc_ca_certs, cc_ntp, cc_power_state_change, and cc_resolv_conf for Alpine. Add Alpine template files for Chrony and Busybox NTP support. Add Alpine template file for /etc/hosts.
2020-08-17cli: add devel make-mime subcommand (#518)Ryan Harper
* cli: add devel make-mime subcommand Cloud-init documents an in-source-tree tool, make-mime.py used to help users create multi-part mime user-data. This tool is not shipped in the cloud-init install and unavailable at runtime. This patch takes tools/make-mime.py and makes the functionality available via the devel subcommand. The primary interface of --attach file:content-type is still present. The cli now adds: -l, --list-types Print out a list of supported content-types -f, --force Ignore errors for unsupported content-types The tool will now raise a RunTime error if the supplied content-type is not supported (or more likely a typo: x-shell-script vs. x-shellscript) * make-mime: write to stderr and exit 1 instead of raising RuntimeError * Update example to match docs * Update docs for make-mime subcommand * Remove tools/make-mime.py; replaced by cloud-init devel make-mime Co-authored-by: Rick Harding <rharding@mitechie.com>