OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins as a part of the Git hosting and code review systems migration detailed in these mailing list posts: http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html Attempts have been made to correct repository namespaces and hostnames based on simple pattern matching, but it's possible some were updated incorrectly or missed entirely. Please reach out to us via the contact information listed at https://opendev.org/ with any questions you may have.
|5 days ago|
|doc/source||2 weeks ago|
|glean||2 weeks ago|
|.coveragerc||3 years ago|
|.gitignore||2 years ago|
|.gitreview||5 days ago|
|.mailmap||4 years ago|
|.testr.conf||4 years ago|
|CONTRIBUTING.rst||4 years ago|
|HACKING.rst||4 years ago|
|LICENSE||4 years ago|
|MANIFEST.in||4 years ago|
|README.rst||4 months ago|
|rebuild-test-output.sh||3 years ago|
|setup.cfg||4 months ago|
|setup.py||4 years ago|
|test-requirements.txt||2 weeks ago|
|tox.ini||4 months ago|
Glean is a program intended to configure a system based on configuration provided in a configuration drive.
Different cloud providers have different ways of providing networking and other configuration to guest virtual-machines. Many use DHCP but others, notably Rackspace, use configuration provided via a configuration drive.
Broadly, glean checks for configuration drive based information and, if found, uses that to configure the network. If config-drive is not found, it falls back to configuring any available interfaces with DHCP.
Specifically, it will mount the special block-device with label config-2 and parse the network_info.json and vendor_info.json files within. If appropriate network configuration is found, it will write out network configuration files.
The format of the network_info.json file is documented here. Please note that glean does not implement every feature listed.
If no network info is found there, available interfaces can be probed from /sys/class/net and any that appear to be up will be configured for use with DHCP.
It will also handle authorized_keys and host-name info provided from meta_data.json.
Glean determines the network configuration environment for the running platform and configures the interfaces appropriately.
On platforms where systemd is detected glean-install will add a udev rules file (99-glean.rules) that triggers on any network device being added. This will run the glean@.service systemd template for the interface specified.
This systemd unit firstly determines if there is already a /etc/sysconfig/network/ configuration for the interface; if so, the interface is considered configured and skipped.
If not, glean is started with the interface that triggered this event specified as an argument. The configuration drive is probed to see if network configuration for the interface is available. If so, it will be added, otherwise the interface will configured for DHCP.
networkd support is implemented as a separate distribution type. Currently it is only supported on Gentoo, and will be automatically selected by glean-install. It will similarly install a systemd service file or openrc config file (both are supported on Gentoo) and udev rules to call glean.
upstart and sysv environments are also supported. These will have init scripts installed to run glean at boot.
Glean ships glean-install, a script which install glean into your system startup environment. It should handle sysv, upstart and systemd to cover all major distributions. This should be run once, during install or image build.
The startup environment will be modified as described above to configure any found interfaces.
Glean differs to cloud-init mainly in its very reduced dependency footprint. In a dynamic CI environment such as OpenStack, many of the python dependencies for cloud-init can cause conflicts with packages or versions required for testing.
Glean also better supports static IP allocation within config-drive, particuarly important within the Rackspace environment.