summaryrefslogtreecommitdiff
path: root/cloudinit/distros/arch.py
AgeCommit message (Collapse)Author
2021-07-20Update pylint to v2.9.3 and fix the new issues it spots (#946)Paride Legovini
In CI run against pylint 2.9.3 and fix occurrences of: - W0237 (arguments-renamed) - W0402 (deprecated-module) The W0402 deprecated-module was about module `imp`: cloudinit/patcher.py:9: [W0402(deprecated-module), ] Uses of a deprecated module 'imp' The imp module is deprecated and replaced by importlib, which according to the documentation has no replacement for acquire_lock() and release_lock(), which are the only reason why `imp` is imported. Nothing about the code using this lock that actually requires it. Let's remove the locking code and the import altogether. Dropping the locking makes patcher.patch() an empty wrapper around _patch_logging(). Rename _patch_logging() to patch_logging() and call it directly instead. Drop patch().
2021-07-01Add new network activators to bring up interfaces (#919)James Falcon
Currently _bring_up_interfaces() is a no-op for any distro using renderers. We need to be able to support bringing up a single interfaces, a list of interfaces, and all interfaces. This should be independent of the renderers, as the network config is often generated independent of the mechanism used to apply it. Additionally, I included a refactor to remove "_supported_write_network_config". We had a confusing call chain of apply_network_config->_write_network_config->_supported_write_network_config. The last two have been combined.
2021-06-18Add support for VMware PhotonOS (#909)sshedi
Also added a new (currently experimental) systemd-networkd renderer, and includes a small refactor to cc_resolv_conf.py to support the resolved.conf used by systemd-resolved.
2021-03-15archlinux: Fix broken locale logic (#841)Kristian Klausen
The locale wasn't persisted correct nor set. LP: #1402406
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-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>
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-06-08Move subp into its own module. (#416)Scott Moser
This was painful, but it finishes a TODO from cloudinit/subp.py. It moves the following from util to subp: ProcessExecutionError subp which target_path I moved subp_blob_in_tempfile into cc_chef, which is its only caller. That saved us from having to deal with it using write_file and temp_utils from subp (which does not import any cloudinit things now). It is arguable that 'target_path' could be moved to a 'path_utils' or something, but in order to use it from subp and also from utils, we had to get it out of utils.
2019-07-16Support netplan renderer in Arch LinuxConrad Hoffmann
Support is for now implemented in such a way that it will fall back to the old `_write_network()` if netplan is not available on the image.
2018-03-02Change some list creation and population to literal.Rémy Léone
This will provide a small performance improvement and shorter code.
2017-08-01archlinux: Fix bug with empty dns, do not render 'lo' devices.Scott Moser
If no dns nameservers were provided a stack trace would occur. The changes here add some unit tests for the arch distro. Also avoids rendering an 'lo' interface. LP: #1663045 LP: #1706593
2017-07-24archlinux: fix set hostname usage of write_file.Joshua Powers
cloud-init fails to set the hostname on Arch Linux because that _write_hostname passes conf instead of str(conf) to util.write_file. LP: #1705306
2017-04-21pylint: fix all logging warningsJoshua Powers
This will change all instances of LOG.warn to LOG.warning as warn is now a deprecated method. It will also make sure any logging uses lazy logging by passing string format arguments as function parameters.
2016-12-22LICENSE: Allow dual licensing GPL-3 or Apache 2.0Jon Grimm
This has been a recurring ask and we had initially just made the change to the cloud-init 2.0 codebase. As the current thinking is we'll just continue to enhance the current codebase, its desirable to relicense to match what we'd intended as part of the 2.0 plan here. - put a brief description of license in LICENSE file - put full license versions in LICENSE-GPLv3 and LICENSE-Apache2.0 - simplify the per-file header to reference LICENSE - tox: ignore H102 (Apache License Header check) Add license header to files that ship. Reformat headers, make sure everything has vi: at end of file. Non-shipping files do not need the copyright header, but at the moment tests/ have it.
2016-06-15fix some errors reported by pylintScott Moser
pylint --errors-only found several errors. Some of the changes here represent real errors, others just code that pylint did not like.
2016-03-03Update pep8 runner and fix pep8 issuesRyan Harper
2015-01-27Respond to review:Barry Warsaw
- Remove str() wrappers to second argument to write_files() where it is no longer necessary. Also: Fixed a couple of other octal literals which clearly weren't being tested.
2015-01-21Largely merge lp:~harlowja/cloud-init/py2-3 albeit manually because it seemedBarry Warsaw
to be behind trunk. `tox -e py27` passes full test suite. Now to work on replacing mocker.
2015-01-16hostname: apply hostname same as is writtenScott Moser
on RHEL, we were writing to persistent configuration the fqdn, but invoking 'hostname' on the first boot with just the shortname. On 'reboot', then the hostname would differ. Now, whatever we write, invoke hostname with. Also remove some duplicate code. LP: #1246485
2014-09-10pyflakes fixes.Scott Moser
make pyflakes now passes.
2014-07-29do not put comments in /etc/timezoneScott Moser
comments in /etc/timezone are not expected, and can cause problems if another tool tries to read it. LP: #1341710
2014-02-12drop 'is_excluded'.Scott Moser
for now, this the mechanism just doesn't seem right. I think i'd rather have the module declare supported distros than have distros declare [un]supported modules.
2014-02-12fix pylint warning (and real bug) in bad spelling of resolve_conf_fnScott Moser
2014-02-06Added arch network configNate House nathan.house@rackspace.com
2014-02-04Update ssh_svcname in initNate House nathan.house@rackspace.com
2014-02-04Initial arch distro add.Nate House nathan.house@rackspace.com