- Jul 28, 2020
-
-
Mark Goddard authored
Including tasks has a performance penalty when compared with importing tasks. If the include has a condition associated with it, then the overhead of the include may be lower than the overhead of skipping all imported tasks. In the case of the check-containers.yml include, the included file only has a single task, so the overhead of skipping this task will not be greater than the overhead of the task import. It therefore makes sense to switch to use import_tasks there. Partially-Implements: blueprint performance-improvements Change-Id: I65d911670649960708b9f6a4c110d1a7df1ad8f7
-
- Jul 24, 2020
-
-
Mark Goddard authored
This reverts commit 8fc86893. It appears that it is still necessary to wait for ironic to be up, otherwise inspector may fail to start: The baremetal service for 192.0.2.10:None exists but does not have any supported versions. Change-Id: Ibc8314c91113618ce9e92b8933a63eba3cf3bbe1
-
- Jul 08, 2020
-
-
jacky06 authored
The bug is fixed[1], releated task is unncessary. [1]: https://storyboard.openstack.org/#!/story/2006393 Depends-On: Ib62ca3ee4626084e5e9b90e93e4fa97938023457 Change-Id: I2553c3c4a6d3c82405c68c52db2e7585477b1dff
-
- Jul 07, 2020
-
-
Mark Goddard authored
The common role was previously added as a dependency to all other roles. It would set a fact after running on a host to avoid running twice. This had the nice effect that deploying any service would automatically pull in the common services for that host. When using tags, any services with matching tags would also run the common role. This could be both surprising and sometimes useful. When using Ansible at large scale, there is a penalty associated with executing a task against a large number of hosts, even if it is skipped. The common role introduces some overhead, just in determining that it has already run. This change extracts the common role into a separate play, and removes the dependency on it from all other roles. New groups have been added for cron, fluentd, and kolla-toolbox, similar to other services. This changes the behaviour in the following ways: * The common role is now run for all hosts at the beginning, rather than prior to their first enabled service * Hosts must be in the necessary group for each of the common services in order to have that service deployed. This is mostly to avoid deploying on localhost or the deployment host * If tags are specified for another service e.g. nova, the common role will *not* automatically run for matching hosts. The common tag must be specified explicitly The last of these is probably the largest behaviour change. While it would be possible to determine which hosts should automatically run the common role, it would be quite complex, and would introduce some overhead that would probably negate the benefit of splitting out the common role. Partially-Implements: blueprint performance-improvements Change-Id: I6a4676bf6efeebc61383ec7a406db07c7a868b2a
-
Mark Goddard authored
There are a number of tasks where we conditionally use include_tasks with a condition, and the condition is always true. This change removes these conditions, in preparation for switching unconditional task includes to task imports. Partially-Implements: blueprint performance-improvements Change-Id: I3804c440fe3552950d9d434ef5409f685c39bbcf
-
- Jun 07, 2020
-
-
wu.chunyang authored
non-root user has no permission to create directory under /opt directory. use "become: true" to resolve it. Change-Id: I155efc4b1e0691da0aaf6ef19ca709e9dc2d9168
-
- Apr 28, 2020
-
-
Marcin Juszkiewicz authored
Change-Id: I18f8855a758703968aba032add68add24b31f673 Closes-bug: #1875588
-
- Apr 14, 2020
-
-
James Kirsch authored
Refactor service configuration to use the copy certificates task. This reduces code duplication and simplifies implementing encrypting backend HAProxy traffic for individual services. Change-Id: I0474324b60a5f792ef5210ab336639edf7a8cd9e
-
- Apr 09, 2020
-
-
Dincer Celik authored
Some services look for /etc/timezone on Debian/Ubuntu, so we should introduce it to the containers. In addition, added prechecks for /etc/localtime and /etc/timezone. Closes-Bug: #1821592 Change-Id: I9fef14643d1bcc7eee9547eb87fa1fb436d8a6b3
-
- Apr 08, 2020
-
-
Mark Goddard authored
This is a follow up to I001defc75d1f1e6caa9b1e11246abc6ce17c775b. To maintain previous behaviour, and ensure we catch any host configuration changes, we should perform host configuration during upgrade. Change-Id: I79fcbf1efb02b7187406d3c3fccea6f200bcea69 Related-Bug: #1860161
-
- Apr 03, 2020
-
-
Mark Goddard authored
The use of default(omit) is for module parameters, not templates. We define a default value for openstack_cacert, so it should never be undefined anyway. Change-Id: Idfa73097ca168c76559dc4f3aa8bb30b7113ab28
-
- Apr 02, 2020
-
-
Mark Goddard authored
Currently there are a few services that perform host configuration tasks. This is done in config.yml. This means that these changes are performed during 'kolla-ansible genconfig', when we might expect not to be making any changes to the remote system. This change separates out these host configuration tasks into a config-host.yml file, which is included directly from deploy.yml. One change in behaviour is that this prevents these tasks from running during an upgrade or genconfig. This is probably what we want, but we should be careful when any of these host configuration tasks are changed, to ensure they are applied during an upgrade if necessary. Change-Id: I001defc75d1f1e6caa9b1e11246abc6ce17c775b Closes-Bug: #1860161
-
- Mar 10, 2020
-
-
yj.bai authored
When change the cert file in /etc/kolla/certificate/. The certificate in the container has not changed. So I think can use kolla-ansible deploy when certificate is changed. restart <container> Partially-Implements: blueprint custom-cacerts Change-Id: Iaac6f37e85ffdc0352e8062ae5049cc9a6b3db26 Signed-off-by:
yj.bai <bai.yongjun@99cloud.net>
-
- Mar 02, 2020
-
-
Radosław Piliszek authored
Both include_role and import_role expect role's name to be given via "name" param instead of "role". This worked but caused errors with ansible-lint. See: https://review.opendev.org/694779 Change-Id: I388d4ae27111e430d38df1abcb6c6127d90a06e0
-
- Feb 28, 2020
-
-
Mark Goddard authored
We assume that all groups are present in the inventory, and quite obtuse errors can result if any are not. This change adds a precheck that checks for the presence of all expected groups in the inventory for each service. It also introduces a common service-precheck role that we can use for other common prechecks. Change-Id: Ia0af1e7df4fff7f07cd6530e5b017db8fba530b3 Partially-Implements: blueprint improve-prechecks
-
- Feb 25, 2020
-
-
James Kirsch authored
Service REST API urls should be constructed using the {{ internal_protocol }} and {{ external_protocol }} configuration parameters. Change-Id: Id1e8098cf59f66aa35b371149fdb4b517fa4c908 Closes-Bug: 1862817
-
- Jan 30, 2020
-
-
Mark Goddard authored
In dev mode currently the python source is mounted under python2.7 site-packages. This change fixes this to use the distro_python_version variable to ensure dev mode works with Python 3 images. Change-Id: Ieae3778a02f1b79023b4f1c20eff27b37f481077 Partially-Implements: blueprint python-3
-
- Jan 28, 2020
-
-
James Kirsch authored
Delegate executing uri REST methods to the current module containers using kolla_toolbox. This will allow self signed certificate that are already copied into the container to be automatically validated. This circumvents requiring Kolla Ansible to explicitly disable certificate validation in the ansible uri module. Partially-Implements: blueprint custom-cacerts Change-Id: I2625db7b8000af980e4745734c834c5d9292290b
-
James Kirsch authored
When kolla_copy_ca_into_containers is set to "yes", the Certificate Authority in /etc/kolla/certificates will be copied into service containers to enable trust for that CA. This is especially useful when the CA is self signed, and would not be trusted by default. Partially-Implements: blueprint custom-cacerts Change-Id: I4368f8994147580460ebe7533850cf63a419d0b4
-
- Jan 13, 2020
-
-
James Kirsch authored
Include a reference to the globally configured Certificate Authority to all services. Services use the CA to verify HTTPs connections. Change-Id: I38da931cdd7ff46cce1994763b5c713652b096cc Partially-Implements: blueprint support-trusted-ca-certificate-file
-
- Jan 10, 2020
-
-
Mark Goddard authored
For the CentOS 7 to 8 transition, we will have a period where both CentOS 7 and 8 images are available. We differentiate these images via a tag - the CentOS 8 images will have a tag of train-centos8 (or master-centos8 temporarily). To achieve this, and maintain backwards compatibility for the openstack_release variable, we introduce a new 'openstack_tag' variable. This variable is based on openstack_release, but has a suffix of 'openstack_tag_suffix', which is empty except on CentOS 8 where it has a value of '-centos8'. Change-Id: I12ce4661afb3c255136cdc1aabe7cbd25560d625 Partially-Implements: blueprint centos-rhel-8
-
- Dec 12, 2019
-
-
Mark Goddard authored
Ironic provides a feature to allow instance images to be served from a local HTTP server [1]. This is the same server used for PXE images with iPXE. This does not work currently because the ironic_ipxe container does not have access to /var/lib/ironic/images (ironic docker volume), where the images are cached. Note that to make use of this feature, the following is required in ironic.conf: [agent] image_download_source = http This change fixes the issue by giving ironic_ipxe container access to the ironic volume. [1] https://docs.openstack.org/ironic/latest/admin/interfaces/deploy.html#deploy-with-custom-http-servers Change-Id: I501d02cfd40fbacea32d551c3912640c5661d821 Closes-Bug: #1856194
-
- Nov 22, 2019
-
-
Michal Nasiadka authored
As part of the effort to implement Ansible code linting in CI (using ansible-lint) - we need to implement recommendations from ansible-lint output [1]. One of them is to stop using local_action in favor of delegate_to - to increase readability and and match the style of typical ansible tasks. [1]: https://review.opendev.org/694779/ Partially implements: blueprint ansible-lint Change-Id: I46c259ddad5a6aaf9c7301e6c44cd8a1d5c457d3
-
- Oct 31, 2019
-
-
Mark Goddard authored
If ironic inspector starts up before ironic-api is accessible, we see the following error: AttributeError: StrictVersion instance has no attribute 'version' This actually prevents startup of ironic inspector. Example: http://paste.openstack.org/show/756342/ The underlying issue is in python-ironicclient: https://storyboard.openstack.org/#!/story/2006393. The workaround employed here is to wait for ironic-api to become available before starting ironic-inspector. Change-Id: I674982eba5082fdc951cdcb8247d706278c64c1a Closes-Bug: #1839866
-
- Oct 16, 2019
-
-
Radosław Piliszek authored
Introduce kolla_address filter. Introduce put_address_in_context filter. Add AF config to vars. Address contexts: - raw (default): <ADDR> - memcache: inet6:[<ADDR>] - url: [<ADDR>] Other changes: globals.yml - mention just IP in comment prechecks/port_checks (api_intf) - kolla_address handles validation 3x interface conditional (swift configs: replication/storage) 2x interface variable definition with hostname (haproxy listens; api intf) 1x interface variable definition with hostname with bifrost exclusion (baremetal pre-install /etc/hosts; api intf) neutron's ml2 'overlay_ip_version' set to 6 for IPv6 on tunnel network basic multinode source CI job for IPv6 prechecks for rabbitmq and qdrouterd use proper NSS database now MariaDB Galera Cluster WSREP SST mariabackup workaround (socat and IPv6) Ceph naming workaround in CI TODO: probably needs documenting RabbitMQ IPv6-only proto_dist Ceph ms switch to IPv6 mode Remove neutron-server ml2_type_vxlan/vxlan_group setting as it is not used (let's avoid any confusion) and could break setups without proper multicast routing if it started working (also IPv4-only) haproxy upgrade checks for slaves based on ipv6 addresses TODO: ovs-dpdk grabs ipv4 network address (w/ prefix len / submask) not supported, invalid by default because neutron_external has no address No idea whether ovs-dpdk works at all atm. ml2 for xenapi Xen is not supported too well. This would require working with XenAPI facts. rp_filter setting This would require meddling with ip6tables (there is no sysctl param). By default nothing is dropped. Unlikely we really need it. ironic dnsmasq is configured IPv4-only dnsmasq needs DHCPv6 options and testing in vivo. KNOWN ISSUES (beyond us): One cannot use IPv6 address to reference the image for docker like we currently do, see: https://github.com/moby/moby/issues/39033 (docker_registry; docker API 400 - invalid reference format) workaround: use hostname/FQDN RabbitMQ may fail to bind to IPv6 if hostname resolves also to IPv4. This is due to old RabbitMQ versions available in images. IPv4 is preferred by default and may fail in the IPv6-only scenario. This should be no problem in real life as IPv6-only is indeed IPv6-only. Also, when new RabbitMQ (3.7.16/3.8+) makes it into images, this will no longer be relevant as we supply all the necessary config. See: https://github.com/rabbitmq/rabbitmq-server/pull/1982 For reliable runs, at least Ansible 2.8 is required (2.8.5 confirmed to work well). Older Ansible versions are known to miss IPv6 addresses in interface facts. This may affect redeploys, reconfigures and upgrades which run after VIP address is assigned. See: https://github.com/ansible/ansible/issues/63227 Bifrost Train does not support IPv6 deployments. See: https://storyboard.openstack.org/#!/story/2006689 Change-Id: Ia34e6916ea4f99e9522cd2ddde03a0a4776f7e2c Implements: blueprint ipv6-control-plane Signed-off-by:
Radosław Piliszek <radoslaw.piliszek@gmail.com>
-
- Sep 26, 2019
-
-
Kris Lindgren authored
Sometimes as cloud admins, we want to only update code that is running in a cloud. But we dont need to do anything else. Make an action in kolla-ansible that allows us to do that. Change-Id: I904f595c69f7276e71692696471e32fd1f88e6e8 Implements: blueprint deploy-containers-action
-
- Sep 17, 2019
-
-
Mark Goddard authored
Use upstream Ansible modules for registration of services, endpoints, users, projects, roles, and role grants. Change-Id: I7c9138d422cc91c177fd8992347176bb54156b5a
-
- Sep 06, 2019
-
-
Mark Goddard authored
In the Train cycle, ironic added a [nova] section to its configuration. This is used to configure access to Nova API, for sending power state callbacks. This change adds the [nova] section to ironic.conf. Change-Id: Ib891af1db2a2c838c887e858ea0721f5e6a4fab0 Closes-Bug: #1843070
-
Mark Goddard authored
The ironic configuration in ironic.conf uses several options which have been removed in the Train cycle: [glance] glance_api_servers was removed in https://review.opendev.org/#/c/665929. [neutron] url was removed in https://review.opendev.org/#/c/672971. We should use the endpoint catalog instead of specifying the endpoint for both of these, and also ironic inspector. region_name and valid_interfaces have been added for that purpose. Other options are deprecated. [conductor] api_url: Use [service_catalog] section to lookup ironic API endpoint instead. [inspector] enabled: No longer used. Change-Id: If07c4ff9bfea7d780aeff5c3295a0ace7d10ecdc Closes-Bug: #1843067
-
- Aug 30, 2019
-
-
Jan Horstmann authored
Upstream ironic went from $net_default_ip to $net_default_mac in ironic/drivers/modules/master_grub_cfg.txt with https://review.opendev.org/#/c/578959/ This commit makes the same change for ansible/roles/ironic/templates/ironic_pxe_uefi.default.j2 Using $net_default_ip breaks ironic standalone deployments with [dhcp]dhcp_provider = none Change-Id: I2ca9a66d2bdb0aab5cd9936c8be8206e6ade3bd5 Closes-Bug: 1842078
-
- Aug 29, 2019
-
-
Will Szumski authored
Change-Id: Ic80dbe1f4f7289fe2c2143125a381cec4586f7ef Closes-Bug: #1841908
-
- Aug 16, 2019
-
-
Scott Solkhon authored
This commit adds the functionality for an operator to specify their own trusted CA certificate file for interacting with the Keystone API. Implements: blueprint support-trusted-ca-certificate-file Change-Id: I84f9897cc8e107658701fb309ec318c0f805883b
-
- Aug 15, 2019
-
-
Rafael Weingärtner authored
After all of the discussions we had on "https://review.opendev.org/#/c/670626/2", I studied all projects that have an "oslo_messaging" section. Afterwards, I applied the same method that is already used in "oslo_messaging" section in Nova, Cinder, and others. This guarantees that we have a consistent method to enable/disable notifications across projects based on components (e.g. Ceilometer) being enabled or disabled. Here follows the list of components, and the respective changes I did. * Aodh: The section is declared, but it is not used. Therefore, it will be removed in an upcomming PR. * Congress: The section is declared, but it is not used. Therefore, it will be removed in an upcomming PR. * Cinder: It was already properly configured. * Octavia: The section is declared, but it is not used. Therefore, it will be removed in an upcomming PR. * Heat: It was already using a similar scheme; I just modified it a little bit to be the same as we have in all other components * Ceilometer: Ceilometer publishes some messages in the rabbitMQ. However, the default driver is "messagingv2", and not ''(empty) as defined in Oslo; these configurations are defined in ceilometer/publisher/messaging.py. Therefore, we do not need to do anything for the "oslo_messaging_notifications" section in Ceilometer * Tacker: It was already using a similar scheme; I just modified it a little bit to be the same as we have in all other components * Neutron: It was already properly configured. * Nova It was already properly configured. However, we found another issue with its configuration. Kolla-ansible does not configure nova notifications as it should. If 'searchlight' is not installed (enabled) the 'notification_format' should be 'unversioned'. The default is 'both'; so nova will send a notification to the queue versioned_notifications; but that queue has no consumer when 'searchlight' is disabled. In our case, the queue got 511k messages. The huge amount of "stuck" messages made the Rabbitmq cluster unstable. https://bugzilla.redhat.com/show_bug.cgi?id=1478274 https://bugs.launchpad.net/ceilometer/+bug/1665449 * Nova_hyperv: I added the same configurations as in Nova project. * Vitrage It was already using a similar scheme; I just modified it a little bit to be the same as we have in all other components * Searchlight I created a mechanism similar to what we have in AODH, Cinder, Nova, and others. * Ironic I created a mechanism similar to what we have in AODH, Cinder, Nova, and others. * Glance It was already properly configured. * Trove It was already using a similar scheme; I just modified it a little bit to be the same as we have in all other components * Blazar It was already using a similar scheme; I just modified it a little bit to be the same as we have in all other components * Sahara It was already using a similar scheme; I just modified it a little bit to be the same as we have in all other components * Watcher I created a mechanism similar to what we have in AODH, Cinder, Nova, and others. * Barbican I created a mechanism similar to what we have in Cinder, Nova, and others. I also added a configuration to 'keystone_notifications' section. Barbican needs its own queue to capture events from Keystone. Otherwise, it has an impact on Ceilometer and other systems that are connected to the "notifications" default queue. * Keystone Keystone is the system that triggered this work with the discussions that followed on https://review.opendev.org/#/c/670626/2 . After a long discussion, we agreed to apply the same approach that we have in Nova, Cinder and other systems in Keystone. That is what we did. Moreover, we introduce a new topic "barbican_notifications" when barbican is enabled. We also removed the "variable" enable_cadf_notifications, as it is obsolete, and the default in Keystone is CADF. * Mistral: It was hardcoded "noop" as the driver. However, that does not seem a good practice. Instead, I applied the same standard of using the driver and pushing to "notifications" queue if Ceilometer is enabled. * Cyborg: I created a mechanism similar to what we have in AODH, Cinder, Nova, and others. * Murano It was already using a similar scheme; I just modified it a little bit to be the same as we have in all other components * Senlin It was already using a similar scheme; I just modified it a little bit to be the same as we have in all other components * Manila It was already using a similar scheme; I just modified it a little bit to be the same as we have in all other components * Zun The section is declared, but it is not used. Therefore, it will be removed in an upcomming PR. * Designate It was already using a similar scheme; I just modified it a little bit to be the same as we have in all other components * Magnum It was already using a similar scheme; I just modified it a little bit to be the same as we have in all other components Closes-Bug: #1838985 Change-Id: I88bdb004814f37c81c9a9c4e5e491fac69f6f202 Signed-off-by:
Rafael Weingärtner <rafael@apache.org>
-
- Jul 18, 2019
-
-
Radosław Piliszek authored
Docker has no restart policy named 'never'. It has 'no'. This has bitten us already (see [1]) and might bite us again whenever we want to change the restart policy to 'no'. This patch makes our docker integration honor all valid restart policies and only valid restart policies. All relevant docker restart policy usages are patched as well. I added some FIXMEs around which are relevant to kolla-ansible docker integration. They are not fixed in here to not alter behavior. [1] https://review.opendev.org/667363 Change-Id: I1c9764fb9bbda08a71186091aced67433ad4e3d6 Signed-off-by:
Radosław Piliszek <radoslaw.piliszek@gmail.com>
-
- Jul 12, 2019
-
-
Mark Goddard authored
The ironic inspector iPXE configuration includes the following kernel argument: initrd=agent.ramdisk However, the ramdisk is actually called ironic-agent.initramfs, so the argument should be: initrd=ironic-agent.initramfs In BIOS boot mode this does not cause a problem, but for compute nodes with UEFI enabled, it seems to be more strict about this, and fails to boot. Change-Id: Ic84f3b79fdd3cd1730ca2fb79c11c7a4e4d824de Closes-Bug: #1836375
-
Mark Goddard authored
A common class of problems goes like this: * kolla-ansible deploy * Hit a problem, often in ansible/roles/*/tasks/bootstrap.yml * Re-run kolla-ansible deploy * Service fails to start This happens because the DB is created during the first run, but for some reason we fail before performing the DB sync. This means that on the second run we don't include ansible/roles/*/tasks/bootstrap_service.yml because the DB already exists, and therefore still don't perform the DB sync. However this time, the command may complete without apparent error. We should be less careful about when we perform the DB sync, and do it whenever it is necessary. There is an argument for not doing the sync during a 'reconfigure' command, although we will not change that here. This change only always performs the DB sync during 'deploy' and 'reconfigure' commands. Change-Id: I82d30f3fcf325a3fdff3c59f19a1f88055b566cc Closes-Bug: #1823766 Closes-Bug: #1797814
-
- Jun 27, 2019
-
-
Mark Goddard authored
Currently, we have a lot of logic for checking if a handler should run, depending on whether config files have changed and whether the container configuration has changed. As rm_work pointed out during the recent haproxy refactor, these conditionals are typically unnecessary - we can rely on Ansible's handler notification system to only trigger handlers when they need to run. This removes a lot of error prone code. This patch removes conditional handler logic for all services. It is important to ensure that we no longer trigger handlers when unnecessary, because without these checks in place it will trigger a restart of the containers. Implements: blueprint simplify-handlers Change-Id: I4f1aa03e9a9faaf8aecd556dfeafdb834042e4cd
-
- Jun 06, 2019
-
-
Mark Goddard authored
Many tasks that use Docker have become specified already, but not all. This change ensures all tasks that use the following modules have become: * kolla_docker * kolla_ceph_keyring * kolla_toolbox * kolla_container_facts It also adds become for 'command' tasks that use docker CLI. Change-Id: I4a5ebcedaccb9261dbc958ec67e8077d7980e496
-
- Jun 05, 2019
-
-
Jason authored
When ansible goes in to a loop, by default it prints all the keys for the item it is looping over. Some roles, when setting up the databases, iterate over an object that includes the database password. Override the loop label to hide everything but the database name. Change-Id: I336a81a5ecd824ace7d40e9a35942a1c853554cd
-
- May 17, 2019
-
-
binhong.hua authored
When integrating 3rd party component into openstack with kolla-ansible, maybe have to mount some extra volumes to container. Change-Id: I69108209320edad4c4ffa37dabadff62d7340939 Implements: blueprint support-extra-volumes
-