Commit Graph

300 Commits

Author SHA1 Message Date
Jakob Meng
ee008f7a79 Allow to use Ansible OpenStack Col. 1.x.x with openstacksdk >=0.99.0
Ansible OpenStack collection 1.x.x is not compatible to openstacksdk
>=0.99.0, only collection series 2.x.x will be. But the latter has
not been released yet.

This incompatibility only affects modules in Ansible OpenStack
Collection but not the functions that metalsmith uses. Those
functions ARE compatible with recent openstacksdk releases and
will most likely not be removed in collection release 2.0.0.

Thus, as a hacky workaround to allow using Ansible OpenStack
collection 1.x.x with openstacksdk >=0.99.0 this patch removes
the MAXIMUM_SDK_VERSION.

Change-Id: Icbcb0f92fc1e4315e81fe9ce0c2f9ce6b39867c2
2022-10-11 14:42:34 +02:00
Jay Faulkner
523cc1d49a CI: Force ansible to version 5
Default ansible version was changed in CI; this change is to validate
and workaround the issue by forcing the older ansible version. We will
still need to update the version before Zuul support for 5 is removed.

Change-Id: I3119055467a4edfdb13c522ce1c81d2f7eb3588d
2022-10-10 13:19:18 -07:00
cc8fe24d40 Add Python3 antelope unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for antelope.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I81af7f55703046e349c3b7c4bffcf6c6cadb472d
2022-09-08 07:52:30 +00:00
951e6435cc Update master for stable/zed
Add file to the reno documentation build to show release notes for
stable/zed.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/zed.

Sem-Ver: feature
Change-Id: If9988dcccb8b6eb7be97955f73a3ffcdeb1c5b3f
2022-09-08 07:52:29 +00:00
Dmitry Tantsur
77d802f3d6 Deprecate instance network boot
Remove or update the corresponding CI jobs. Use the new custom Cirros
image in the HTTP job to avoid relying on CentOS.

Temporary increase complexity requirements while we have a deprecation
warning in the provisioner.

Change-Id: I5e65f9949ee3b78430309017800b88c1ba21dd02
2022-08-24 13:19:52 +02:00
Steve Baker
6c5e68a443 Do a precise node lookup for unprovision
A hostname or name is passed to the unprovision call, and the node is
looked up by allocation name (hostname), falling back to node name.

This can result in the wrong node being unprovisioned in the following
scenario:
* node and hostname naming scheme are identical
* node and hostname names are mixed because allocation placement
  doesn't take the node name into account
* a node has already been unprovisioned by hostname (allocation)
  lookup
* unprovision is performed a second time, this time matching the
  hostname with a different node's name
* the wrong node is unprovisioned

The unprovision_node method can also take a node object instead of a
string identifier, so this change does a precise node lookup before
calling it. This means only hostnames are used for allocation lookups,
and node names for node lookups.

Change-Id: I9507f8d30c871ae62a250148789393695d59183a
Resolves: rhbz#2092444
2022-07-12 08:55:39 +00:00
Riccardo Pittau
f234b87bbb Add linters job
Fix lint errors to unblock CI

Change-Id: I02c1d7cc9f2f91e76d1b3edbc340df7ea83d2902
2022-07-12 10:05:31 +02:00
Zuul
3f91201be5 Merge "metalsmith_instances module, unprovision by hostname" 2022-06-24 00:34:48 +00:00
Zuul
c79aaef1b6 Merge "metalsmith_instances module, pass hostname in reserve" 2022-06-24 00:34:46 +00:00
Zuul
4f3b968844 Merge "metalsmith list handle missing port" 2022-06-23 23:50:42 +00:00
Julia Kreger
98c4c96c33 CI: Extend timeouts for RAX
It appears our jobs end up encountering some performance issues
on some RAX hosts where the overall runtime is already close to
the maximum for the job window.

Ultimately what happens is the performance ends up putting the boot
of the workload VM just a little bit later and we end up failing
the job as the VM is still early in booting up.

Change-Id: I309220d7f61f87b7457668fcf586d4ea152d363b
2022-06-23 09:32:13 -07:00
Steve Baker
5459c30ed4 metalsmith_instances module, unprovision by hostname
The node lookup for unprovision first attempts the allocation name
(hostname)[1] but the metalsmith_instances unprovision passes the node
name.

This means in cases where the node naming scheme and the allocation
naming scheme are the same, the wrong node may be unprovisioned.

This change switches to passing the hostname for unprovision, only
passing the node name if the hostname is missing from the instances
entry.

[1] https://opendev.org/openstack/metalsmith/src/branch/master/metalsmith/_provisioner.py#L653

Change-Id: Ie6b989f8d67c03606be37310777175cfb8d9303e
Resolves: rhbz#2092444
2022-06-20 10:18:08 +12:00
Steve Baker
e6568a02bd metalsmith_instances module, pass hostname in reserve
The allocation name/hostname is set during the provision step, but it
is also possible to set it during the reserve step, which is done in
this change.

Setting the name during reservation is more correct, and triggers some
extra sanity checks during provision. But it also enables this change[1]
which attempts to reserve the node with the same name as the
allocation.

[1] https://review.opendev.org/c/openstack/ironic/+/845856

Change-Id: I0da4644a955b8e9fbf509c074b939b97c64739cb
2022-06-20 10:18:02 +12:00
Steve Baker
cf6b37ab22 metalsmith list handle missing port
Currently if a port is missing, running metalsmith list will fail with
an error. This change handles missing ports by not showing any IP
address for that VIF, and logging a warning.

Change-Id: I94924ebc81b46a2aa4c3b6f82bd46480f37b3150
Resolves: rhbz#2092444
2022-06-16 09:43:59 +12:00
Dmitry Tantsur
5816be550b Provide a work around to fix the CI
Somehow, openstacksdk ends up logging to stdout. Strip the log message
before parsing it as JSON.

Change-Id: Id8e635de7bd8a246af7ae1750a556b752dd7dc85
2022-05-24 15:34:05 +02:00
Dmitry Tantsur
a3e205fc05 Add a CentOS job with legacy local boot
When netboot is removed from Ironic, we need a job to cover local boot
in legacy mode. The new job will do it.

Also drop "local" from the job name, it's the default.

Change-Id: I6cad4556d770a733245d12f9a211e8ff7a3d884b
2022-05-16 18:16:26 +02:00
Dmitry Tantsur
018a19c1e8 Add a workaround to fix the CI
Change-Id: I9f939d115e0c6d167ab437c4420e06b4b211c66b
2022-04-14 16:24:19 +02:00
d06a066813 Add Python3 zed unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for zed.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I3757f2ffe3fc521bb1b61512a7228da9d8a69f65
2022-03-07 14:07:55 +00:00
c0955b12e9 Update master for stable/yoga
Add file to the reno documentation build to show release notes for
stable/yoga.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/yoga.

Sem-Ver: feature
Change-Id: I8d6d17078ef0df3b6e9c72436336351edcf96b09
2022-03-07 14:07:52 +00:00
Zuul
eefbe08138 Merge "Ensure tox.ini is ASCII" 2022-02-21 21:11:18 +00:00
Steve Baker
72677fcaec Ensure tox.ini is ASCII
The left/right single quotation marks cause an ascii decode error in
some python3.6 environments.

Change-Id: I1675929d410ab46278fcac001eae4a1aea321126
2022-02-18 12:51:28 +13:00
Harald Jensås
264836d59a Allow both 'network' and 'subnet' in NIC
Fixes and issue where a port cannot be created on
a specific subnet if there are multiple subnets
with the same name on different networks.

Allows both 'network' and 'subnet' in NIC information,
when looking up the subnet filter on the network_id when
both 'network' and 'subnet' is provided.

Story: 2009732
Task: 44152
Change-Id: Ied2d16ec33fe71522c3461d3df6e70fbfdd976b2
2022-02-01 09:50:41 +01:00
Dmitry Tantsur
ce81c05548 Avoid non-Stream CentOS 8, it is EOL
Change-Id: I4300568c346ae81f0717584d1dbc9e75450b951b
2022-01-31 22:01:45 +01:00
Zuul
880d9e47d3 Merge "Add unit tests for metalsmith/_nics.py" 2021-12-15 20:00:20 +00:00
Ghanshyam Mann
f656931857 Re-add python 3.6/3.7 in classifier
We have updated the yoga testing runtime to keep the
py36 testing.

- https://review.opendev.org/c/openstack/governance/+/820195

Unit tests job template is also updated to keep python
3.6 as a voting job. So with the py3.6 and py3.9 testing as voting
job template, we are keeping python 3.6, 3.7, 3.8, and 3.8 as
tested versions in the Yoga cycle.

- https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/820286

This commit re-add the python 3.6/3.7 versions in setup.cfg classifier.

Change-Id: Ia66c7f6f1475804467b3b8f2df8c1e79a9fa11b6
2021-12-13 19:44:49 -06:00
Harald Jensås
043f80b45a Add unit tests for metalsmith/_nics.py
Add unit tests for metalsmith._nics.detach_and_delete_ports
and metalsmith._nics.NICs.

Change-Id: I767a6981fb960954f53d86475927bb97aa967ed6
2021-12-10 18:34:33 +01:00
Julia Kreger
347c354d8d CI: Extend metalsmith CI job timeout
Metalsmith has always been a fairly long running job, in part
because it hast to build images, and then deploy them.

It appears, we are seeing increased occurances of the job
timing out due to what appears to be just slightly slower IO
performance. Overall major steps are still executing in an
acceptable amount of time, just towards the further end of
what we typically expect to see in CI.

As such, extend the overall job timeout a little bit to give
it time to hopefully finish. Extends the job timeout 1000 seconds,
which is a bit over sixteen more minutes to allow the job to
complete cleaning.

Change-Id: I5c7928e341ffcbc94f1beb8a33a8d10d89bae8a7
2021-12-09 08:38:19 -08:00
Riccardo Pittau
6c830e048f Use only Yoga tests
TC has decided to keep support for Python 3.6 during the Yoga cycle.
For more info see [1]

[1] http://lists.openstack.org/pipermail/openstack-discuss/2021-December/026164.html

Change-Id: I8e1bd9abcfd91d2230fe33dda781afee22b27fc2
2021-12-03 08:55:57 +01:00
Zuul
53f487ae06 Merge "Test python 3.6 for distributions compatibility" 2021-11-30 18:19:05 +00:00
Riccardo Pittau
4a08c3693a Test python 3.6 for distributions compatibility
As discussed during the ironic meeting on 29/11/2021, the community has
decided to continue testing the code against Python 3.6 to keep
compatibility with distributions that have native support for it, such
as CentOS Stream 8, Ubuntu Bionic, Debian 10, and openSuse Leap, at
least until it's possible and reasonable considering the support granted
from other dependencies and libraries, and not beyond the Yoga cycle.

Change-Id: I7f060e816bf91636e5d3890ee8d076574c2ab474
2021-11-30 10:51:09 +01:00
Harald Jensås
81d820f28f Set binding:host_id on VIFs
Set the 'binding:host_id' on neutron port VIFs when
they are created, or update it for existing ports.

This ensures IP allocation is not deferred by neutron.

If IP allocation is deferred, the config-drive network
metadata will not include enough information to properly
bootstrap the instance networking.

Story: 2009715
Task: 44089
Closes-Bug: #1952573
Change-Id: I7411c1f2fbc57dad0504fe61e278308030f059bf
2021-11-30 02:23:30 +01:00
Ghanshyam Mann
9a890bf0bd Updating yoga tested python versions in classifier
Yoga testing runtime has been updated with py38 and py39
as voting and removed the py36 testing. Unit tests update are
handled by the job template change in openstack-zuul-job and you
can see the updated jobs running in gate.

- https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/818609

this commit updates the tested py versions in setup.cfg classifier.

[1] https://governance.openstack.org/tc/reference/runtimes/yoga.html

Change-Id: Id4d7a2ec4569318d669af0c6e9f10de078d3e8e3
2021-11-24 20:07:22 -06:00
Julia Kreger
7268987813 CI: remove old centos7 job
Depends-On: https://review.opendev.org/c/openstack/ironic-python-agent/+/817472
Change-Id: Idf65adf1364808f57e34d980ea18268626b03262
2021-11-10 11:36:21 -08:00
Riccardo Pittau
5e5e421ddd Update pep8 test requirements
Change-Id: I9a50f796b0b2ce762e1054a6b5e900ccd53bf796
2021-10-28 14:53:49 +02:00
Riccardo Pittau
ab69212fe7 Set explicit boot mode to bios for legacy job
The default boot mode for ironic is now uefi [1]
The legacy jobs should set IRONIC_BOOT_MODE explicitely to bios.

[1] 493b4f0caf

Change-Id: If5c8feb3a829eaff56519846de3e5ccd6bab24c4
2021-10-11 14:46:57 +02:00
Harald Jensås
f98dfa61c1 Write network_data.json metadata to config-dirve
cloud-init will use fall-back config when network metadata
is *not* present. This works fine if the first NIC on the node is
connected to a network with DHCP. But, when the first NIC is not
used for provisioning, cloud-init will only write a fallback config
for the first NIC. This causes the provisioned node to be unavailable.

Extend instance configuration to include network metadata so that
cloud-init can configure node networking.

Story: 2009238
Task: 43378
Change-Id: I70f1a972a6d5a0398cd348f00308957386d66067
2021-09-22 14:50:02 +02:00
56cf1fe6f3 Add Python3 yoga unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for yoga.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I90f7a3a50953345db8c288d7ef1a0769801341f7
2021-09-10 14:32:04 +00:00
9615de0ea3 Update master for stable/xena
Add file to the reno documentation build to show release notes for
stable/xena.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/xena.

Sem-Ver: feature
Change-Id: Ia6bcc429fbf365f430ca41b85af0ad055f7e0056
2021-09-10 14:32:03 +00:00
Zuul
2a39acc6d5 Merge "Changed minversion in tox to 3.18.0" 2021-08-18 11:02:06 +00:00
Takashi Kajinami
d9c167d070 Use importlib instead of imp
... because the imp module is deprecated since Python 3.4 .

Change-Id: Id6f2dd16b05090c0409cdab9d77d15eb8ce87ca9
2021-08-17 08:16:59 +09:00
Zuul
1224d2b7dd Merge "Replace deprecated import of ABCs from collections" 2021-07-20 05:05:51 +00:00
Julia Kreger
e1e6cc367d Set glance limit for baremetal friendly images
The devstack default limit enforcement for glance defaults
to 1GB, and unfortunately this is too small for many to use
larger images such as centos which includes hardware firmware
images for execution on baremetal where drivers need the vendor
blobs in order to load/run.

Sets metalsmith-integration-base to 5GB.

Depends-On: https://review.opendev.org/c/openstack/devstack/+/801309
Change-Id: If3f7cd61ebce5f1724fe4fa56a9bf0e9793d8485
2021-07-19 10:35:30 -07:00
Takashi Kajinami
419e384ebb Replace deprecated import of ABCs from collections
ABCs in collections should be imported from collections.abc and direct
import from collections is deprecated since Python 3.3.

Change-Id: Ibca1d5756d7598e961e21c5ba9bd6e17bb895285
2021-07-17 00:59:22 +09:00
wu.shiming
606c88b5fb Changed minversion in tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace tox's whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: I9c7bff59c195480ce6bd11dfdab7601bbdcba9e2
2021-07-06 16:00:29 +08:00
Steve Baker
407e5051d4 Set image_disk_format from file extension for HTTP images
Node instance_info `image_disk_format` needs to be set to `raw` for
large raw images or the deployment may fail with a memory check error
or a full node tmpfs. Even when there is no error, without
image_disk_format=raw the image will not be streamed directly to disk.

image_disk_format is auto-detected and set by ironic for glance and
file sourced images, but this does not occur for direct HTTP based
images.

This change will set image_disk_format=raw when the URL file extension
ends with .raw, which is enough to support TripleO's conventions for
the overcloud raw image.

Change-Id: I6a9c225fc2d14b2d07cd0bf2379cd2c8c548f312
2021-07-06 14:58:59 +12:00
YuehuiLei
2fe17330d6 setup.cfg: Replace dashes with underscores
Setuptools v54.1.0 introduces a warning that the use of dash-separated
options in 'setup.cfg' will not be supported in a future version [1].
Get ahead of the issue by replacing the dashes with underscores. Without
this, we see 'UserWarning' messages like the following on new enough
versions of setuptools:

  UserWarning: Usage of dash-separated 'description-file' will not be
  supported in future versions. Please use the underscore name
  'description_file' instead

[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb

Change-Id: Ia65fa32546eb1eea1c4bc1d68b2fb279604b1e29
2021-05-11 15:02:17 +08:00
Dmitry Tantsur
048ddb5744 Stop testing the iscsi deploy interface
Change-Id: I8bb6a7c5ca0b8e8092f24eb5fdf6247619fb12dc
2021-04-30 17:21:15 +02:00
Zuul
f87484776b Merge "Add Python3 xena unit tests" 2021-03-18 14:09:43 +00:00
Zuul
3441b458c1 Merge "remove unicode from code" 2021-03-18 12:43:32 +00:00
8cd0f73a49 Add Python3 xena unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for xena.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: Idf9bab2536a6dc3f628c33c7ac2d1b5dc19bc256
2021-03-18 10:23:47 +00:00