-
Notifications
You must be signed in to change notification settings - Fork 13
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
create pvs in crc #540
Conversation
Unable to freeze job graph: Job pvs_crc is abstract and may not be directly run |
.zuul.yaml
Outdated
- stf-crc-ocp_412-nightly_bundles | ||
- stf-crc-ocp_412-local_build | ||
- stf-crc-ocp_413-nightly_bundles |
There was a problem hiding this comment.
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.
- 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 |
ci/define_pvs.yml
Outdated
- 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 |
There was a problem hiding this comment.
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
- 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 |
There was a problem hiding this comment.
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 😅
ci/define_pvs.yml
Outdated
cmd: | | ||
oc get pv | grep "storage..-crc"| wc -l | ||
register: cmd_output | ||
failed_when: "cmd_output.stdout|int !=12" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/b69bb1fdcfe84af1b78604af80277615 ❌ pvs_crc FAILURE in 10m 39s |
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/4f157b25913c4115baa90329487919fd ❌ pvs_crc FAILURE in 7m 53s |
ci/define_pvs.yml
Outdated
name: rhol_crc | ||
tasks_from: add_crc_creds.yml | ||
|
||
- name: "Check if the install_yamls already exists" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
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. |
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/86321430a94047bcadb774ce17edd271 ❌ pvs_crc FAILURE in 9m 14s |
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/fb058c56b2ac4ab3a0f94a70590a9787 ✔️ pvs_crc SUCCESS in 10m 19s |
ci/vars-local_build.yml
Outdated
@@ -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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
recheck |
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/1e65b26b418141d1b4bede4d6197dede ✔️ pvs_crc SUCCESS in 10m 04s |
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/280dda5bb8c3403e93472be579d856ba ✔️ pvs_crc SUCCESS in 8m 41s |
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/790c87af09894727b7f658767061db67 ✔️ pvs_crc SUCCESS in 10m 08s |
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/55fab1ab277e4c45a6060368335bbd44 ✔️ pvs_crc SUCCESS in 12m 12s |
Depends-On: openstack-k8s-operators/install_yamls#642