openshift / appliance

OpenShift-based Appliance Builder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

failed to load asset "Appliance Config" : failed to request latest release

inho-cho-redhat opened this issue · comments

What happened?
When to build, an error occured.

export APPLIANCE_IMAGE="quay.io/edge-infrastructure/openshift-appliance"
export APPLIANCE_ASSETS="/home/test/appliance_assets"
podman run --rm -it --privileged --net=host -v $APPLIANCE_ASSETS:/assets:Z $APPLIANCE_IMAGE build

FATAL failed to load asset "Appliance Config": failed to request latest release: Get "https://api.openshift.com/api/upgrades_info/graph?arch=amd64&channel=stable-4.12": context deadline exceeded (Client.Timeout exceeded while awaiting headers) 

What did you expect to happen?

INFO Successfully downloaded CoreOS ISO
INFO Successfully generated recovery CoreOS ISO
INFO Successfully pulled container registry image
INFO Successfully pulled OpenShift 4.12.10 release images required for bootstrap
INFO Successfully pulled OpenShift 4.12.10 release images required for installation
INFO Successfully generated data ISO
INFO Successfully downloaded appliance base disk image
INFO Successfully extracted appliance base disk image
INFO Successfully generated appliance disk image
INFO Time elapsed: 8m0s
INFO
INFO Appliance disk image was successfully created in assets directory: assets/appliance.raw
INFO
INFO Create configuration ISO using: openshift-install agent create config-image
INFO Download openshift-install from: https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/4.12.10/openshift-install-linux.tar.gz

Here is my appliance-config.yaml

apiVersion: v1beta1
kind: ApplianceConfig
ocpRelease:
  version: 4.12.26
  channel: stable
  cpuArchitecture: x86_64
diskSizeGB: 150
pullSecret: 'my-pull-secret'
sshKey: 'my-ssh-public-key'
userCorePass: 'redhat123'

How to resolve this issue?

Hey @inho-cho-redhat, looks like there was a network connectivity error to openshift api server.
Can you please check 'api.openshift.com' is accessible from the machine, and try again.

Thanks for reaching out, @inho-cho-redhat.

I agree with what @danielerez said.
Also, one question: Are these the right logs? I see your ApplianceConfig is set to version: 4.12.26, whereas the logs mention 4.12.10.

Thank you for your quick response.

@danielerez I ran following the instruction described in the document (https://github.com/openshift/appliance/blob/master/docs/user-guide.md). There is no comment about how to set the right address. Would you let me know how to set the address?

@nmagnezi Yes, In order to show the desired result as an example, the contents described in the document were imported and shown.

Thank you for your quick response.

@danielerez I ran following the instruction described in the document (https://github.com/openshift/appliance/blob/master/docs/user-guide.md). There is no comment about how to set the right address. Would you let me know how to set the address?

So no need to manually set the address. Just need to ensure it's resolvable in the machine.
I.e. you should be able to access api.openshift.com. If it works, then it could have been just a temporary network connectivity problem. So trying again might mitigate the issue.

@nmagnezi Yes, In order to show the desired result as an example, the contents described in the document were imported and shown.

@danielerez Thank you. To build image, the environment should connect "api.openshift.com".

INFO Successfully downloaded CoreOS ISO           
INFO Successfully generated recovery CoreOS ISO   
INFO Successfully pulled container registry image 
INFO Successfully pulled OpenShift 4.12.26 release images required for bootstrap 
INFO Successfully pulled OpenShift 4.12.26 release images required for installation 
INFO Successfully generated data ISO              
INFO Successfully downloaded appliance base disk image 
INFO Successfully extracted appliance base disk image 
INFO Successfully generated appliance disk image  
INFO Time elapsed: 20m9s                          
INFO                                              
INFO Appliance disk image was successfully created in assets directory: assets/appliance.raw 
INFO                                              
INFO Create configuration ISO using: openshift-install agent create config-image 
INFO Download openshift-install from: https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/4.12.26/openshift-install-linux.tar.gz