Bug 1304395

Summary: openstack overcloud image upload fails with "Required file "./ironic-python-agent.initramfs" does not exist."
Product: [Community] RDO Reporter: Attila Darazs <adarazs>
Component: openstack-tripleoAssignee: James Slagle <jslagle>
Status: CLOSED WORKSFORME QA Contact: yeylon <yeylon>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: LibertyCC: adarazs, apevec, srevivo
Target Milestone: ---Keywords: AutomationBlocker
Target Release: Liberty   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1334259 (view as bug list) Environment:
Last Closed: 2016-04-04 15:35:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
output of openstack overcloud image build --all none

Description Attila Darazs 2016-02-03 13:33:20 UTC
Description of problem:
After a successful "openstack overcloud image build --all", this file doesn't get created, which results in an upload failure.

Version-Release number of selected component (if applicable):
Latest production liberty on CentOS

How reproducible: 100%

Steps to Reproduce:
1. openstack overcloud image build --all
2. openstack overcloud image upload

Additional info:
Here's a CentOS CI job that gives this error: https://ci.centos.org/view/rdo/job/rdo_manager-periodic-7-rdo-liberty-production-centos-7.0-templates-virthost-minimal-neutron-ml2-vxlan-smoke/324/consoleFull

Please note that currently a workaround is needed for https://bugzilla.redhat.com/show_bug.cgi?id=1278972 before you can even hit this error on production.

Unfortunately the image building log is not collected from the host yet, but it should be reproducible locally, it just didn't happen yet on my side.

Comment 1 Attila Darazs 2016-02-05 16:51:39 UTC
I reproduced the image building step locally, attaching the logs. It seems the kilo repositories are used for the image building instead of the liberty ones.

Maybe we're not setting somewhere the image building source to liberty?

+ source /var/tmp/image.UMeliFth/hooks/root.d/../environment.d/10-rdo-release-name.bash
++ export RDO_RELEASE=kilo
++ RDO_RELEASE=kilo
+ for env_file in '$env_files'
+ source /var/tmp/image.UMeliFth/hooks/root.d/../environment.d/14-manifests
++ '[' 0 -gt 0 ']'
++ set -eu
++ set -o pipefail
++ export DIB_MANIFEST_IMAGE_DIR=/etc/dib-manifests
++ DIB_MANIFEST_IMAGE_DIR=/etc/dib-manifests
++ export DIB_MANIFEST_SAVE_DIR=ironic-python-agent.d/
++ DIB_MANIFEST_SAVE_DIR=ironic-python-agent.d/

...

Checking for virtual provide or file-provide for openstack-ironic-python-agent
No package openstack-ironic-python-agent available.
Error: Nothing to do

Comment 2 Attila Darazs 2016-02-05 16:53:05 UTC
Created attachment 1121456 [details]
output of openstack overcloud image build --all

Comment 3 Attila Darazs 2016-02-05 17:16:34 UTC
Looks like this change is missing from the production repo version of python-tripleoclient:

https://github.com/openstack-packages/python-tripleoclient/blob/rdo-liberty/0001-Remove-hardcoded_RDO_RELEASE.patch

https://github.com/openstack/python-tripleoclient/blob/stable/liberty/tripleoclient/v1/overcloud_image.py#L428

Resulting in using kilo repos for image building.

Comment 4 Alan Pevec (Fedora) 2016-02-10 17:40:39 UTC
> Looks like this change is missing from the production repo version of
> python-tripleoclient:
> 
> https://github.com/openstack-packages/python-tripleoclient/blob/rdo-liberty/
> 0001-Remove-hardcoded_RDO_RELEASE.patch


python-tripleoclient-0.0.11-3.el7 has that patch, which NVR did you get?

Comment 5 John Trowbridge 2016-02-10 21:35:56 UTC
actually I think that patch is there, since that is the production repo disgit. We need to `export RDO_RELEASE=liberty` though to use the liberty repos in the image build.

It wouldn't be a bad idea to update the element that does that to default to liberty at this point:

https://github.com/openstack/tripleo-image-elements/blob/master/elements/rdo-release/environment.d/10-rdo-release-name.bash#L1

That said, I don't love using DIB elements for repo setup. It seems easier to just virt-customize exactly the repos you want onto the base images that get fed to DIB.

Comment 6 Attila Darazs 2016-04-04 15:35:39 UTC
I solved the issue by exporting RDO_RELEASE=liberty during image build as John suggested. Thanks for making sure the defaults are sane, Alan. It works now.

Thanks,
Attila