Skip to content

Conversation

@tonyskapunk
Copy link
Contributor

@tonyskapunk tonyskapunk commented Jul 15, 2021

  • Add a role to mirror example-cnf index and related images when using a disconnected environment

Depends-on: https://github.com/dci-labs/inventories/pull/31

@tonyskapunk
Copy link
Contributor Author

check dallas ocp-4.7-vanilla example-cnf


- name: "Apply ImageContentSourcePolicy"
k8s:
src: "{{ mrn_manifest_dir }}/imageContentSourcePolicy.yaml"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that adding a source policy will reboot all the nodes. It results in increased CI duration. In order to avoid reboot for this (to reduce the CI durtation), the top-level mirror entry is added as part of the installation itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just learned that the machine config operator will only reboot nodes on OCP-4.6 and below (openshift/machine-config-operator#2259), that is 4.5 and 4.6.

Are you suggesting to add quay.io/rh-nfv-int to the installation to avoid one extra reboot on those OCP versions that need it? If so, I agree that it will speed-up the time, the only caveat I see is that during installation time we don't know yet if example-cnf will be executed next or not 🤔. Also, any other image not in that registry will also be added through the ImageContentSourcePolicy, for example dpdk.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just learned that the machine config operator will only reboot nodes on OCP-4.6 and below (openshift/machine-config-operator#2259), that is 4.5 and 4.6.

Good to know about this improvement. I still believe machine config will apply the configs on all nodes (without reboot) and restart crio. Do you know whether nodes will go to NOT READY and then READY (faster)? How much time does it take (in 4.7)?

Are you suggesting to add quay.io/rh-nfv-int to the installation to avoid one extra reboot on those OCP versions that need it? If so, I agree that it will speed-up the time, the only caveat I see is that during installation time we don't know yet if example-cnf will be executed next or not thinking. Also, any other image not in that registry will also be added through the ImageContentSourcePolicy, for example dpdk.

Having a mirror entry at the install time for unused images is not going to affect the deployment. All example cnf images are within the quay.io/rh-nfv-int repo, except testpmd image, for which there are already entries as it is from the redhat registry.

Copy link
Contributor Author

@tonyskapunk tonyskapunk Jul 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still believe machine config will apply the configs on all nodes (without reboot) and restart crio.

Correct, it still needs to restart the service if the entries are not yet available in the registries.conf

Do you know whether nodes will go to NOT READY and then READY (faster)? How much time does it take (in 4.7)?

Haven't measured in 4.7 but the last successful job https://www.distributed-ci.io/jobs/40c6303c-c6b7-4bdc-a78f-137b29380333/jobStates#95e71f77-2fb1-4b43-b185-f78565f2c225:file286 shows only a few seconds when the nodes are checked.

Having a mirror entry at the install time for unused images is not going to affect the deployment.

Do you know where I can add that entry so we can save an extra reboot/restart I think is in the file under the setting: disconnected_registry_mirrors_file (in dci-openshift-agent) but any pointer is appreciated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm including the org namespace (rh-nfv-int) in the installer trust bundles https://github.com/dci-labs/service-configs/pull/12 this should speed up when applying the ImageContentSourcePolicies in here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't measured in 4.7 but the last successful job https://www.distributed-ci.io/jobs/40c6303c-c6b7-4bdc-a78f-137b29380333/jobStates#95e71f77-2fb1-4b43-b185-f78565f2c225:file286 shows only a few seconds when the nodes are checked.

Thanks, it's good to know.

@tonyskapunk
Copy link
Contributor Author

check dallas ocp-4.7-vanilla example-cnf

@tonyskapunk
Copy link
Contributor Author

check dallas ocp-4.7-vanilla example-cnf

@dcibot
Copy link

dcibot commented Jul 17, 2021

Unable to find cluster5 pipeline

@dcibot
Copy link

dcibot commented Jul 17, 2021

SUCCESS from #25

@dcibot
Copy link

dcibot commented Jul 17, 2021

Unable to find cluster5 pipeline

@dcibot
Copy link

dcibot commented Jul 17, 2021

SUCCESS from #25

@dcibot
Copy link

dcibot commented Jul 17, 2021

@dcibot
Copy link

dcibot commented Jul 17, 2021

@dcibot
Copy link

dcibot commented Jul 17, 2021

@dcibot
Copy link

dcibot commented Jul 17, 2021

@dcibot
Copy link

dcibot commented Jul 19, 2021

@dcibot
Copy link

dcibot commented Jul 19, 2021

@dcibot
Copy link

dcibot commented Jul 19, 2021

@dcibot
Copy link

dcibot commented Jul 19, 2021

@dcibot
Copy link

dcibot commented Jul 19, 2021

@dcibot
Copy link

dcibot commented Jul 19, 2021

@dcibot
Copy link

dcibot commented Jul 19, 2021

@tonyskapunk
Copy link
Contributor Author

check dallas ocp-4.7-vanilla example-cnf

{{ mrn_mirror_index_image }}
{{ mrn_local_registry }}

- name: "Apply ImageContentSourcePolicy"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still required after the mirror is added?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the config has been already added it will not render a new machineConfig and the following steps will go really quick.
I think it would be good to leave it just in case someone else is running it without that entry in the ImageContentSourcePolicy already.

@dcibot
Copy link

dcibot commented Jul 21, 2021

@tonyskapunk
Copy link
Contributor Author

check dallas ocp-4.7-vanilla example-cnf

Copy link
Contributor

@betoredhat betoredhat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice mirroring role, LGTM

@tonyskapunk tonyskapunk marked this pull request as ready for review July 21, 2021 21:57
@tonyskapunk
Copy link
Contributor Author

I'll go ahead and merge, we can rollback or modify if it's necessary.

@tonyskapunk tonyskapunk merged commit a1bab8c into master Jul 21, 2021
@tonyskapunk tonyskapunk deleted the mirroring branch July 21, 2021 22:10
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.

6 participants