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

create pvs in crc #540

Closed
wants to merge 19 commits into from
Closed

create pvs in crc #540

wants to merge 19 commits into from

Conversation

mgirgisf
Copy link
Contributor

@mgirgisf mgirgisf commented Nov 21, 2023

Copy link

Unable to freeze job graph: Job pvs_crc is abstract and may not be directly run

.zuul.yaml Show resolved Hide resolved
.zuul.yaml Outdated
Comment on lines 101 to 103
- stf-crc-ocp_412-nightly_bundles
- stf-crc-ocp_412-local_build
- stf-crc-ocp_413-nightly_bundles
Copy link
Collaborator

Choose a reason for hiding this comment

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

These jobs take quite a while to run.

For testing, I recommend that you comment them out so that you can get results faster from the pvs_crc job.

Suggested change
- stf-crc-ocp_412-nightly_bundles
- stf-crc-ocp_412-local_build
- stf-crc-ocp_413-nightly_bundles
#- stf-crc-ocp_412-nightly_bundles
#- stf-crc-ocp_412-local_build
#- stf-crc-ocp_413-nightly_bundles

Comment on lines 23 to 32
- name: Check if make command exists
ansible.builtin.command: "command -v make"
register: make_check_result
ignore_errors: true

- name: Install make if not present
ansible.builtin.package:
name: make
state: present
when: make_check_result.rc != 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

The package module should only install make if it doesn't already exist.
So this check and when are not needed

Suggested change
- name: Check if make command exists
ansible.builtin.command: "command -v make"
register: make_check_result
ignore_errors: true
- name: Install make if not present
ansible.builtin.package:
name: make
state: present
when: make_check_result.rc != 0
- name: Install make if not present
ansible.builtin.package:
name: make
state: present

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 forgot that, thanks emma 😅

cmd: |
oc get pv | grep "storage..-crc"| wc -l
register: cmd_output
failed_when: "cmd_output.stdout|int !=12"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd like to see some output here as well e.g. a debug.
You can use the ansible.builtin.fail module to check cmd_output.stdout_lines | length

Since we don't control the creation of the PVs, I would revise this test, since the number of lines may change without changing the PVs, for example.

Copy link
Collaborator

Choose a reason for hiding this comment

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

IINM, we want to be able to use the PVs in the {{ namespace }} namespace/project [1], so there should be a check for that.

[1]

namespace: "service-telemetry"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes , this is not the final test , I believe I still need to create pvc to be used directly in the pods this create only the pvs , but wanted to check how the zuul will run it , so I created it as a draft pull request but this is not done yet

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://review.rdoproject.org/zuul/buildset/b69bb1fdcfe84af1b78604af80277615

pvs_crc FAILURE in 10m 39s
✔️ stf-crc-ocp_412-nightly_bundles SUCCESS in 23m 11s
✔️ stf-crc-ocp_412-local_build SUCCESS in 35m 39s
✔️ stf-crc-ocp_413-nightly_bundles SUCCESS in 26m 51s
✔️ stf-crc-ocp_413-local_build SUCCESS in 38m 48s

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://review.rdoproject.org/zuul/buildset/4f157b25913c4115baa90329487919fd

pvs_crc FAILURE in 7m 53s

name: rhol_crc
tasks_from: add_crc_creds.yml

- name: "Check if the install_yamls already exists"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Best practice with zuul is to never clone anything in your jobs.

You can configure zuul to clone the required repos as part of the job setup.
This is done in .zuul.yaml in the required-projects section of the job (in this case, the parent stf-base)
Once a project is cloned, it is available at {{ ansible_env.HOME }}/{{ zuul.projects[<fully qualified project name>].src_dir }}
You can see examples of this in ci/vars-zuul-common.yml.

The projects you can include are listed in rdo/config repo [2].
In this case, the relevant section is in [3] and the fully-qualified project name is github.com/openstack-k8s-operators/install_yamls, which will also be used in .zuul.yaml to tell zuul to include that project.

[1] https://review.rdoproject.org/zuul/build/62079c915ab846b99f1cffc83a4b97f9/log/zuul-info/inventory.yaml
[2] https://review.rdoproject.org/cgit/config/tree/zuul/rdo.yaml
[3] https://review.rdoproject.org/cgit/config/tree/zuul/rdo.yaml#n1231

Copy link
Collaborator

Choose a reason for hiding this comment

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

I can't comment on an unchanged line, the required project should be added after line 14 in .zuul.yaml.

By default, zuul will try to check out the same branch name (i.e. master), but install_yamls does not have this branch, so you'll also need the override-checkout as well as the name for install_yamls.

https://zuul-ci.org/docs/zuul/latest/config/job.html#attr-job.required-projects

Copy link

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/infrawatch/service-telemetry-operator for 540,37f8c94a996c3c1c3547cded0fdb59a26a2720fe

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://review.rdoproject.org/zuul/buildset/86321430a94047bcadb774ce17edd271

pvs_crc FAILURE in 9m 14s
stf-crc-ocp_413-local_build TIMED_OUT in 1h 01m 01s

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://review.rdoproject.org/zuul/buildset/fb058c56b2ac4ab3a0f94a70590a9787

✔️ pvs_crc SUCCESS in 10m 19s
stf-crc-ocp_413-local_build TIMED_OUT in 1h 00m 55s

@@ -2,4 +2,5 @@
__deploy_stf: true
__local_build_enabled: true
__service_telemetry_snmptraps_enabled: true
__service_telemetry_storage_ephemeral_enabled: true
__service_telemetry_storage_ephemeral_enabled: false
__service_telemetry_storage_persistent_storage_class: "crc_storage"
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: This should be in ci/vars-zuul-common.yml

@@ -9,3 +9,5 @@ sgo_dir: "{{ ansible_env.HOME }}/{{ zuul.projects['github.com/infrawatch/smart-g
sg_core_dir: "{{ ansible_env.HOME }}/{{ zuul.projects['github.com/infrawatch/sg-core'].src_dir }}"
sg_bridge_dir: "{{ ansible_env.HOME }}/{{ zuul.projects['github.com/infrawatch/sg-bridge'].src_dir }}"
prometheus_webhook_snmp_dir: "{{ ansible_env.HOME }}/{{ zuul.projects['github.com/infrawatch/prometheus-webhook-snmp'].src_dir }}"
install_yamls_dir: "{{ ansible_env.HOME }}/{{ zuul.projects['github.com/openstack-k8s-operators/install_yamls'].src_dir }}"
__service_telemetry_storage_persistent_storage_class: "crc-storage"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Typo. In vars-local_build, you used an underscore.

Both should be the same.

@elfiesmelfie
Copy link
Collaborator

recheck

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://review.rdoproject.org/zuul/buildset/1e65b26b418141d1b4bede4d6197dede

✔️ pvs_crc SUCCESS in 10m 04s
stf-crc-ocp_413-local_build TIMED_OUT in 1h 01m 00s

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://review.rdoproject.org/zuul/buildset/280dda5bb8c3403e93472be579d856ba

✔️ pvs_crc SUCCESS in 8m 41s
stf-crc-ocp_413-local_build TIMED_OUT in 1h 00m 58s

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://review.rdoproject.org/zuul/buildset/790c87af09894727b7f658767061db67

✔️ pvs_crc SUCCESS in 10m 08s
stf-crc-ocp_413-local_build FAILURE in 21m 06s

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://review.rdoproject.org/zuul/buildset/55fab1ab277e4c45a6060368335bbd44

✔️ pvs_crc SUCCESS in 12m 12s
stf-crc-ocp_413-local_build FAILURE in 1h 00m 25s

@mgirgisf mgirgisf closed this Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants