Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tunnel related improvements #949

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Akrog
Copy link
Contributor

@Akrog Akrog commented Nov 20, 2024

In this PR I'm adding some fixes and features helpful for a PoC I'm working on where we connect a remote edpm node using tunnel.

Changes are as follow:

  • Fix openstack_deploy_prep target that is setting CTLPLANE_IP_ADDRESS_PREFIX to an IPv6 prefix.
  • Support changing dataplane kustomization scenario directory location using instead of always assuming it's within the cloned openstack-operator samples directory
  • Remove the DHCP static IP assignment when VM is down
  • Support post gen edpm kustomize scripts on the edpm_deploy_prep target.

More information on these changes is available on the respective patches commit message.

In the `openstack_deploy_prep` target we are setting
`CTLPLANE_IP_ADDRESS_PREFIX` to `NNCP_CTLPLANE_IPV6_ADDRESS_PREFIX`,
which isn't correct because we are assigning an IPv6 prefix to an IPv4
prefix variable.

This patch changes it to use the right prefix
`NNCP_CTLPLANE_IP_ADDRESS_PREFIX`.
@openshift-ci openshift-ci bot requested review from fao89 and olliewalsh November 20, 2024 17:48
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/a1b8beb9e29c49d3920e1cbb1547cd68

✔️ openstack-k8s-operators-content-provider SUCCESS in 4h 33m 48s
✔️ install-yamls-crc-podified-edpm-baremetal SUCCESS in 1h 33m 50s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 18m 52s
✔️ adoption-standalone-to-crc-ceph-provider SUCCESS in 3h 22m 15s
adoption-standalone-to-crc-no-ceph-provider FAILURE in 2h 06m 38s

@Akrog
Copy link
Contributor Author

Akrog commented Nov 21, 2024

recheck

Current `edpm_deploy_prep` target only allows to change the dataplane
kustomize scenario within those provided by the openstack operator, but
we may want to provide our own.

This patch introduces a way to change the samples dir with a custom one
using the `DATAPLANE_SAMPLES_DIR` variable, which would still use the
`DATAPLANE_KUSTOMIZE_SCENARIO` variable to form the full location.

It also introduces a way to set the full path to the scenario ignoring
the scenario variable using variable `DATAPLANE_KUSTOMIZE_DIR`.
When using the `attach_default_interface_cleanup` target of devsetup on
a system where the CRC VM is no longer present it will fail to remove
the static DHCP entry from the libvirt network.

This patch makes the `interfaces-setup-cleanup.sh` script more robust as
it will now remove the static entry even when the VM is gone (using the
static IP address assigned).
This patch introduces a mechanism to run an arbitrary script on the
`edpm_deploy_prep` target after the `kustomization.yaml` file has been
created by the `gen-edpm-kustomize.sh` script.

This provides a flexible mechanism to modify things in the kustomization
that are not currently possible.

An example is to use a different ansible host for deployment than the IP
that will be used as the `ctlplane` network IP.

The variable used to define the location of the script is
`EDPM_POST_GEN_SCRIPT`.

Example of usage:

```
$ make edpm_deploy \
  DATAPLANE_POST_GEN_SCRIPT="$(realpath ./scripts/change-ansible-hosts.sh)"
```

And the contents of `change-ansible-hosts.sh` are:

```
sed -i "s/value: 192.168.122.100/value: 192.168.1.13/" kustomization.yaml
```
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/0d3f815f5ef94a2e885693cbc1068d19

✔️ openstack-k8s-operators-content-provider SUCCESS in 3h 32m 46s
✔️ install-yamls-crc-podified-edpm-baremetal SUCCESS in 1h 24m 09s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 17m 40s
✔️ adoption-standalone-to-crc-ceph-provider SUCCESS in 3h 20m 06s
adoption-standalone-to-crc-no-ceph-provider FAILURE in 50m 44s

@Akrog Akrog changed the title Tunnel related improvement Tunnel related improvements Nov 29, 2024
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/b84dbd9c84ed45e18ab98857ca2eea55

✔️ openstack-k8s-operators-content-provider SUCCESS in 3h 29m 28s
✔️ install-yamls-crc-podified-edpm-baremetal SUCCESS in 1h 29m 27s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 20m 26s
✔️ adoption-standalone-to-crc-ceph-provider SUCCESS in 3h 16m 36s
adoption-standalone-to-crc-no-ceph-provider FAILURE in 50m 21s

If we don't set the VLANs MTUs in the NNCP we will always get a default
value and not a value based on the bridge like it should.

With this patch we allow setting the VLAN MTU specifically for the OCP
cluster.

This is necessary when the underlying interface is a tunnel and not a
physical NIC.

By default it will be set to the same value as the network mtu.
Currently we always try to setup the RDO repo, but if we run the script
on a RHEL repo it will fail to find the URL.

With this patch we allow not setting up the repository.
With this patch we'll be able to allow using the default values for
`registry_url`, `image_prefix` and `image_tag` when the values for their
corresponding variables are empty.
Copy link
Contributor

openshift-ci bot commented Dec 16, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Akrog
Once this PR has been reviewed and has the lgtm label, please assign olliewalsh for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/8002e7b6473f4fc2a4931d2a102235f6

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 39m 20s
✔️ install-yamls-crc-podified-edpm-baremetal SUCCESS in 1h 22m 36s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 23m 47s
adoption-standalone-to-crc-ceph-provider NODE_FAILURE Node request 099-0007705129 failed in 0s
adoption-standalone-to-crc-no-ceph-provider NODE_FAILURE Node request 099-0007705130 failed in 0s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant