3671 Commits

Author SHA1 Message Date
apetrich
4ce46dcae1 Exposes the community validation init command
[downstream-only]
This patch exposes the community validation init command to
the openstack cli.

Change-Id: I1c3396bb166424724ceb2745295dafe81c65e50a
2022-01-14 08:11:30 +00:00
Zuul
cad32f38c3 Merge "Remove additional patching to use gitpython with eventlet" 2022-01-11 23:40:34 +00:00
Zuul
f073071c46 Merge "Use Python3 yoga unit tests" 2022-01-11 21:40:22 +00:00
Zuul
b97d4e7a59 Merge "Make deployed ceph baremetal file optional" 2022-01-10 23:29:32 +00:00
Zuul
0b7713ffe5 Merge "Handle missing ipv6 boolean in network_data.yaml for Ceph" 2022-01-10 12:20:17 +00:00
Zuul
d63f84c6d9 Merge "Removed overcloud container commands" 2022-01-06 18:20:04 +00:00
Zuul
467ea5b877 Merge "Fix deploy templates arg validation" 2022-01-06 18:20:02 +00:00
Zuul
446e44c6e2 Merge "Make --deployed-server the default" 2022-01-06 17:00:35 +00:00
John Fulton
79fa6fbe1c Handle missing ipv6 boolean in network_data.yaml for Ceph
It's not valid input to exclude the ipv6 boolean when
using IPv6, but when this happens the client fails with
a type error. Handle this situation better and return
a better error message.

Closes-Bug: 1956517
Change-Id: Id99346ac0fc336b306550e71da0f9b746ff83ef1
2022-01-05 22:13:31 +00:00
Zuul
3712cede1f Merge "Don't assume json network config in validations" 2021-12-23 20:46:46 +00:00
John Fulton
84055814f9 Make deployed ceph baremetal file optional
If the --ceph-spec option is passed to 'openstack
overcloud ceph deploy', then it is not necessary
for the path to the environment file output from
'openstack overcloud node provision' to be passed.

Add conditional to ensure that either --ceph-spec
or <deployed_baremetal.yaml> are used and add two
unit tests to cover all three scenarios: a. metal
is passed, b. spec is passed and c. neither are
passed so a failure is asserted.

Depends-On: I9a6bd27f825d226b508053e4b7d2670a14f6f773
Change-Id: Ibd350956f401fa48aaeae89fdd5e0bd9c28d0685
2021-12-22 16:44:39 +00:00
Alex Schultz
6e0f514c8f Fix deploy templates arg validation
With the addition of the vip file validation, we broke the check for
the templates arg resulting in a stack trace if templates is not
provided rather then a user friendly error message. This change moves
the vip file validation to it's own check later in the process once the
working directory has been created. The working directory is not created
until after the validation of params.

Change-Id: I67b7dc71542533607e3280b4fac3acfb95203b41
Closes-Bug: #1955573
2021-12-22 08:21:35 -07:00
John Fulton
2ac3953410 Add --mon-ip option to deployed ceph
Add --mon-ip option to 'openstack overcloud
ceph deploy', to easily override the variable
tripleo_cephadm_first_mon_ip from the CLI.

This option makes deployed ceph easier when
using standalone.

Change-Id: Id9a61356e8fd4618ce68faa2677f4ed30981b7d6
2021-12-21 19:39:43 +00:00
Zuul
294e42f599 Merge "Don't run playbooks if role count == 0" 2021-12-21 09:07:53 +00:00
Zuul
2dea5787c0 Merge "overcloud node extract provisioned - fixed_ips" 2021-12-21 09:07:50 +00:00
Zuul
2ceb8b2adb Merge "Test coverage for the overcloud_cell submodule" 2021-12-21 03:53:15 +00:00
Zuul
43247fd23f Merge "bnr - overcloud restore - Handle correctly the ~ on the path" 2021-12-21 03:48:26 +00:00
Harald Jensås
b9b9dbd74e Don't run playbooks if role count == 0
There is no reason to try to run playbooks limited
to a role name when the role count is zero. It
actually fails because no hosts match.

Add a check to skip roles with count == 0.

Closes-Bug: #1955432
Change-Id: I5312e5362bdeac8337d1d0991e5a94ded5e83f3f
2021-12-20 23:41:49 +01:00
Zuul
7e1d133308 Merge "Add the ability to enable/disable cephadm SSH user" 2021-12-18 00:45:21 +00:00
Steve Baker
f8ee246464 Don't assume json network config in validations
Change I5f5cec5a1622be4983b4d0db392453d1c489fa40 allowed the
net_config_override file to be yaml as well as json, but if
enable_validations is true the _validate_no_ip_change assumes the
network config is json.

This change loads this file as yaml in _validate_no_ip_change.

Change-Id: Iaeadf412865c059d252ffc7087db3853569b74ee
Related-Bug: #1927090
2021-12-17 09:13:49 +13:00
John Fulton
8ab4cc19b3 Add the ability to enable/disable cephadm SSH user
Add `openstack overcloud ceph user enable | disable`
command line option. As requested by those who wish to
disable cephadm and the user which supports it after
deployment. The SSH user and cephadm may be re-enabled
when it is necessary to administer the Ceph cluster.

This also allows the cephadm SSH user to be created
in a separate step.

Add --skip-user-create to 'openstack overcloud ceph deploy'
in case 'openstack overcloud ceph user enable' was used to
handle that step earlier.

Depends-On: I648cdf8c8920c120049f05f13f8b7b73513899f1
Change-Id: Ibd4513183f59ebb94d841a847ecfab0425ba8f5a
2021-12-15 18:30:13 +00:00
Takashi Kajinami
f41c3dbe0e Remove additional patching to use gitpython with eventlet
... because eventlet is no longer involved since Mistral was removed.

Change-Id: Ic409a92c051e4710fd1bcba85513683352f2be8c
2021-12-15 09:37:02 +09:00
James Slagle
3e7f484586 Check old passwords file path during uc validation
The old passwords file path should also be checked during the
_validate_passwords_file undercloud preflight validation. Since the old
path will be migrated when tripleo deploy is run[1], it should be
considered as a valid path to allow the validation to pass.

[1] ddfd6d9940/tripleoclient/v1/tripleo_deploy.py (L290)

Change-Id: Id9da01bc870194273bb8cc5776699b30250ac4fd
Signed-off-by: James Slagle <jslagle@redhat.com>
2021-12-14 10:21:42 -05:00
Harald Jensås
59eae4b3a9 overcloud node extract provisioned - fixed_ips
In the overcloud node extract provisioned command, check
for predictable IPs usage. If used, add networks to the
instance section and set the fixed_ip value by using
RoleNetIpMap stack output as the source.

Closes-Bug: #1951410
Change-Id: I24d76d72aa291262a85a861a8109dde3d4d90e2e
2021-12-14 12:57:47 +01:00
Takashi Kajinami
c32a24db38 Use Python3 yoga unit tests
Because the Xena release is not being created for TripleO repos, test
runtime is not updated by automation tools. This change updates
the job template to use the tested runtime for Yoga.

Change-Id: Idaac0bd54c8cc05ef3b1de4c268cdf440b82c8e5
2021-12-14 18:51:24 +09:00
Harald Jensås
ddfd6d9940 Don't set 'subnet' for ctlplane in node extract
Metalsmith does not support both network and subnet
key in a NIC definition. Since the ctlplane port has
vif: True, the subnet to use is automated via ironic
port physical_network and neutron physical_network
segment mapping. Setting the subnet is not neccecary
in this case.

Change-Id: I8ac9fee84d1c830c0df4f34088c12aec98323dbb
Closes-Bug: #1954341
2021-12-09 23:47:54 +01:00
Zuul
1bad146a22 Merge "Use netaddr when comparing local_ip for changes" 2021-12-09 21:54:17 +00:00
Zuul
5fe923b850 Merge "Fix ports cleanup on node unprovision" 2021-12-09 20:46:09 +00:00
Harald Jensås
02b67f8e63 Use netaddr when comparing local_ip for changes
In undercloud preflight validations the IP address in
config is compared to the IP address on the deployed
undercloud. For IPv6 the string discovered on the
system may be in a different format, representing the
same actual IP address and netmask but written using a
different valid syntax.

Load the existing IP and config IP as a netaddr.IPNetwork,
and compare both the networks and IPs to ensure we compare
the actuall address and network, not the strings.

Closes-Bug: #1953552
Change-Id: I42531b4e6f7b3b18ae085cc2eb36234cb306b375
2021-12-07 23:53:01 +01:00
Zuul
e2ed23516c Merge "node extract provisioned - use network_config_update" 2021-12-07 07:32:17 +00:00
Zuul
44a15791fa Merge "Write clouds.yaml/heatrc for tripleo launch heat" 2021-12-03 18:27:33 +00:00
Zuul
cf6449751c Merge "Use 127.0.0.1 for ephemeral Heat server instead of ctlplane ip" 2021-12-03 17:30:24 +00:00
Zuul
3c9d68c80f Merge "Skip Heat pod container image pull for default ephemeral heat images" 2021-12-03 17:30:21 +00:00
Harald Jensås
538261ee8d Fix ports cleanup on node unprovision
Set manage_network_ports also when re-running after
user prompt.

Change-Id: Idd9f7d09e4e6ddc532218c860801930e02923086
Closes-Bug: #1953067
2021-12-02 20:18:01 +01:00
James Slagle
723bf34caf Write clouds.yaml/heatrc for tripleo launch heat
When "openstack tripleo launch heat" is used to start an ephemeral Heat
process, a clouds.yaml and heatrc file are now written to the Heat
working dir that can be used to interact with the ephemeral Heat API.

Change-Id: I35ad22a77362e73695c16b1e5abf02e05f9fdada
Signed-off-by: James Slagle <jslagle@redhat.com>
2021-12-01 17:28:26 -05:00
James Slagle
f1fd9d0982 Use 127.0.0.1 for ephemeral Heat server instead of ctlplane ip
127.0.0.1 should be used for the ephemeral Heat api endpoint IP instead
of the ctlplane IP. There is no need for the api to be listening
externally, and it's more secure if it isn't.

Change-Id: Id9992ee242d381c02cb530838fef21e60d10dfa6
Signed-off-by: James Slagle <jslagle@redhat.com>
2021-12-01 17:28:26 -05:00
James Slagle
0b90f0dce8 Skip Heat pod container image pull for default ephemeral heat images
In overcloud deploy, there was logic to skip the container image pull
when the default ephemeral Heat container images are being used. This is
because the images have already been prepared and tagged as coming from
the "localhost" repo.

This patch adds that same logic in heat_launcher.py directly so that it
can be used by both overcloud deploy and the launch heat command. The
unit test method for the _fetch_container_image method is updated to
test the additional logic.

Change-Id: Ibea0751de50eeba932012467a5857cc3c783b611
Signed-off-by: James Slagle <jslagle@redhat.com>
2021-12-01 17:28:26 -05:00
Francesco Pantano
f49649074a
Pass crush hierarchy data as extra_var
When the Ceph cluster is run, for each OSD the operator can define
an osd crush location (like it used to do with ceph-ansible [1]).
This patch adds to the overcloud ceph deploy command the ability to
accept an additional argument that represents the path where the
hierarchy map is defined.

[1] https://github.com/ceph/ceph-ansible/blob/master/tests/functional/all_daemons/container/hosts

Change-Id: Idd0296928246359e2dbb95f5163f32b653af55a3
2021-11-30 13:38:57 +01:00
Zuul
1e10cb230f Merge "Replace deprecated assertEquals" 2021-11-29 08:06:04 +00:00
John Fulton
7d3c412ee5 Set Ceph ms_bind options for IPv6
If IPv6 is being used set ms_bind_ipv4 false
and ms_bind_ipv6 true in the Ceph configuration.

Without this change it is always necessary to use
the more complicated --config option to deploy IPv6
even if IPv4 is not being used. Instead the --config
option can be reserved for more complex scenarios like
experimental dual stack IPv4 and IPv6.

Follow up patch to If96e1d34d9a918d6e99366590b05c8219dc05e1c.

Related-Bug: #1950178
Change-Id: I86ad9631c62ae2abac7e01825ea2266a9def0b83
2021-11-24 19:49:15 +00:00
Zuul
a5b0939c8e Merge "Support custom network names with deployed ceph" 2021-11-22 21:03:14 +00:00
Jiri Podivin
8552b8eb50 Test coverage for the overcloud_cell submodule
Basic test cases for the 'overcloud cell export' command,
covering execution with all default argument values,
alternate path of execution with operator provided values
and raising of the 'CellExportError' exception.

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I02a89ce65d3ba1449360f2def96baedd64ac2653
2021-11-19 14:42:17 +01:00
Zuul
4ab912340a Merge "Make inventory file writable" 2021-11-19 10:38:45 +00:00
Zuul
e861b0a40f Merge "bnr CLI enable the conf. of ReaR with ironic on nodes" 2021-11-19 01:29:00 +00:00
Harald Jensås
9ad9323b0a node extract provisioned - use network_config_update
In change If53577a26edcb2dc67458603286471dfb87f0bda
network_deployment_actions was replaced with
network_config_update in the baremetal YAML definition.

Update the overcloud node extract provisioned command
to set network_config_update instead of the removed
network_deployment_actions parameter.

Related-Bug: #1951458
Change-Id: I3d52e17400d4c7b7a7ac8878eb289e8a84df5459
2021-11-18 19:49:56 +01:00
John Fulton
149099c19e Support custom network names with deployed ceph
The cli-deployed-ceph playbook has pre_tasks to define the Ceph
public_network, cluster_network and their names but those tasks
do not support custom network names as per the related bug.

Add a get_ceph_networks utility which extracts the public_network,
cluster_network and their names from the network_data file and
then pass those values directly to the cli-deployed-ceph playbook
via extra_vars.

Related-Bug: #1950178
Change-Id: If96e1d34d9a918d6e99366590b05c8219dc05e1c
2021-11-18 17:52:59 +00:00
Alex Schultz
f321bb4688 Removed overcloud container commands
The following commands have been removed:

  overcloud container image upload
  overcloud container image build
  overcloud container image prepare
  overcloud container image tag discover

They were replaced by the tripleo container based commands and no longer
function.

Change-Id: Ic1f4d76c9e7bf3579b7e47d87b0ee2c86251c0d6
2021-11-17 14:58:03 -07:00
rabi
6b2892508a Make inventory file writable
Looks like ansible_runner.utils.dump_artifact() makes it
read-only and redeploy fails with permission error.

Closes-Bug: #1950767
Change-Id: I32acdb51ac12be08c94efa5c198ea83549a8f034
2021-11-12 15:57:41 +05:30
likui
fa0b75467e Replace deprecated assertEquals
The assertEquals method has been deprecated since it was renamed
to assertEqual in Python 3.2.

https: //docs.python.org/3/library/unittest.html#deprecated-aliases
Change-Id: I5f9ae14fe91c3c3cdf5dd9884997ba6a51091570
2021-11-11 16:06:43 +08:00
Zuul
98e692d00f Merge "Replace deprecated assertRaisesRegexp" 2021-11-09 19:42:21 +00:00