cs9 antelope/master tcib build push job failing on "Stderr: 'Error: cannot find Containerfile or Dockerfile in context directory"

Bug #2028329 reported by Soniya Murlidhar Vyas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Invalid
Critical
Unassigned

Bug Description

cs9 antelope/master tcib build push job failing on "Stderr: 'Error: cannot find Containerfile or Dockerfile in context directory"

Following are the jobs failing:
==============================
1. periodic-container-tcib-build-push-centos-9-antelope
2. periodic-container-tcib-build-push-centos-9-master

Traceback is as follows:
========================

2023-07-21 01:06:29 | 2023-07-21 01:06:29.102 28056 WARNING tcib.builder.buildah.BuildahBuilder [-] Finished call to 'tcib.builder.buildah.BuildahBuilder.build' after 7.533(s), this was the 4th time calling it.
2023-07-21 01:06:43 | 2023-07-21 01:06:43.904 28056 INFO tcib.builder.buildah.BuildahBuilder [-] Building base image with: sudo buildah bud --net=host --volume /etc/pki/rpm-gpg:/etc/pki/rpm-gpg:z --volume /usr/share/tcib/container-images:/usr/share/tcib/container-images:z --volume /home/zuul/ci-framework/artifacts/repositories:/etc/distro.repos.d:z --label tcib_build_tag=a659eb04db995dfc351578482da5faca --format docker --tls-verify=False --logfile /base-build.log -t quay.rdoproject.org/podified-antelope-centos9/openstack-base:a659eb04db995dfc351578482da5faca 
2023-07-21 01:06:43 | Command: sudo buildah bud --net=host --volume /etc/pki/rpm-gpg:/etc/pki/rpm-gpg:z --volume /usr/share/tcib/container-images:/usr/share/tcib/container-images:z --volume /home/zuul/ci-framework/artifacts/repositories:/etc/distro.repos.d:z --label tcib_build_tag=a659eb04db995dfc351578482da5faca --format docker --tls-verify=False --logfile /base-build.log -t quay.rdoproject.org/podified-antelope-centos9/openstack-base:a659eb04db995dfc351578482da5faca
2023-07-21 01:06:43 | Exit code: 125
2023-07-21 01:06:43 | Stdout: ''
2023-07-21 01:06:43 | Stderr: 'Error: cannot find Containerfile or Dockerfile in context directory: stat /home/zuul/workspace/Dockerfile: no such file or directory\n': oslo_concurrency.processutils.ProcessExecutionError: Unexpected error while running command.
2023-07-21 01:06:43 | Command: sudo buildah bud --net=host --volume /etc/pki/rpm-gpg:/etc/pki/rpm-gpg:z --volume /usr/share/tcib/container-images:/usr/share/tcib/container-images:z --volume /home/zuul/ci-framework/artifacts/repositories:/etc/distro.repos.d:z --label tcib_build_tag=a659eb04db995dfc351578482da5faca --format docker --tls-verify=False --logfile /base-build.log -t quay.rdoproject.org/podified-antelope-centos9/openstack-base:a659eb04db995dfc351578482da5faca
2023-07-21 01:06:43 | Exit code: 125

Additional info:
- https://logserver.rdoproject.org/e1/e121b921c2a72a1697b1b7bf1f968e64f094ac81/openstack-periodic-container-antelope-centos9/periodic-container-tcib-build-push-centos-9-antelope/74b735e/logs/build.log
- https://logserver.rdoproject.org/e1/e121b921c2a72a1697b1b7bf1f968e64f094ac81/openstack-periodic-container-antelope-centos9/periodic-container-tcib-build-push-centos-9-antelope/a1686c3/logs/build.log
- https://logserver.rdoproject.org/e1/e121b921c2a72a1697b1b7bf1f968e64f094ac81/openstack-periodic-container-antelope-centos9/periodic-container-tcib-build-push-centos-9-antelope/5651b77/logs/build.log
- https://logserver.rdoproject.org/openstack-periodic-container-master-centos9/review.rdoproject.org/rdo-jobs/master/periodic-container-tcib-build-push-centos-9-master/fe22a95/logs/build.log

Revision history for this message
chandan kumar (chkumar246) wrote :
Download full text (3.3 KiB)

In order to reproduce the issue, here is what i have done.
I have added two pdb set trace at https://github.com/openstack-k8s-operators/tcib/pull/56/files#diff-11a2750a37ee46b0df221580918b8e61e0154531984bb2d0eb077c8f5b4a4834R571 and https://github.com/openstack-k8s-operators/tcib/pull/56/files#diff-11a2750a37ee46b0df221580918b8e61e0154531984bb2d0eb077c8f5b4a4834R613

and below are the results.
```
❯ openstack tcib container image build --repo-dir /tmp/repos/ --volume container-images:/usr/share/tcib/container-images:z --work-dir ~/workspace
2023-07-21 13:38:10.113 70119 INFO tcib.client.container_image.Build [-] Configuration file found: /usr/share/tcib/container-images/containers.yaml
> /home/chandankumar/src/tcib/.venv/lib/python3.11/site-packages/tcib/client/container_image.py(573)take_action()
-> "workdir": self.image_paths.get(image, work_dir),
(Pdb) l
568 [i[0] for i in [(k, v) for k, v in image_configs.items()]]
569 )
570 )
571 import pdb; pdb.set_trace()
572 tcib_variables = {
573 -> "workdir": self.image_paths.get(image, work_dir),
574 "tcib_distro": parsed_args.distro,
575 "tcib_release": parsed_args.release,
576 "tcib_path": self.image_paths.get(image, work_dir),
577 "tcib_package": "python-tcib-containers",
578 "ansible_connection": "local",
(Pdb) image
'openstackclient'

and
❯ openstack tcib container image build --repo-dir /tmp/repos/ --volume container-images:/usr/share/tcib/container-images:z --work-dir ~/workspace
2023-07-21 13:46:46.259 70969 INFO tcib.client.container_image.Build [-] Configuration file found: /usr/share/tcib/container-images/containers.yaml
> /home/chandankumar/src/tcib/.venv/lib/python3.11/site-packages/tcib/client/container_image.py(614)take_action()
-> image_config.update(tcib_variables)
(Pdb) l
609 image_config["tcib_meta"] = {"name": image_parsed_name}
610
611 # For each image we will generate Dockerfiles in the work_dir
612 # following a specific directory structured per image
613 import pdb; pdb.set_trace()
614 -> image_config.update(tcib_variables)
615
616 if parsed_args.rhel_modules:
617 rhel_modules = {}
618 for module in parsed_args.rhel_modules.split(','):
619 try:
(Pdb) image
'base'
(Pdb) self.image_paths.get(image, work_dir)
'/home/chandankumar/workspace/748ba2af-a214-4ee8-ad15-ece1af5cad4b/base'
(Pdb) tcib_variables
{'workdir': '/home/chandankumar/workspace/748ba2af-a214-4ee8-ad15-ece1af5cad4b/base/openstackclient', 'tcib_distro': 'centos', 'tcib_release': '9', 'tcib_path': '/home/chandankumar/workspace/748ba2af-a214-4ee8-ad15-ece1af5cad4b/base/openstackclient', 'tcib_package': 'python-tcib-containers', 'ansible_connection': 'local'}
(Pdb)

```
image name is getting changed due to loop at https://github.com/openstack-k8s-operators/tcib/pull/56/files#diff-11a2750a37ee46b0df221580918b8e61e0154531984bb2d0eb077c8f5b4a4834R591 but
tcib_variables is not getting changed as their value is already stored there. th...

Read more...

Revision history for this message
chandan kumar (chkumar246) wrote :
Revision history for this message
Ronelle Landy (rlandy) wrote :

Marking this invalid as the fix is not in tripleo

Changed in tripleo:
status: Triaged → Fix Released
status: Fix Released → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.