ppc64le-cloud / pvsadm

Tool for managing the IBM Power Systems Virtual Servers
Apache License 2.0
37 stars 38 forks source link

504 unknown error reported due to gateway timeouts while importing image from IBM COS to the PowerVS instance. #32

Open arcprabh opened 3 years ago

arcprabh commented 3 years ago

Test case:

1) Download a qcow2 image and convert it to OVA image using pvsadm image qcow2ova image tool ==> Completed 2) Upload the OVA image to IBM COS using pvsadm image upload tool ==> Completed 3) Import the image from IBM COS to PowerVS instance using pvsadm image import tool ==> Failed with 504 unknown error

Failing command with debug enabled :

[root@chaos-arc46-bastion ~]# ./pvsadm-linux-ppc64le image import -n ocp-validation-toronto-01 -b bucket-validation-team --object-name /root/rhel83-arc-dec3.ova.gz --image-name rhel83-arc-dec3 -r tor01 --debug
I1204 01:45:14.015869  881720 root.go:26] Using an API key from IBMCLOUD_API_KEY environment variable
I1204 01:45:14.016170  881720 import.go:64] Auto Generating the COS Service credential for importing the image
I1204 01:45:19.839502  881720 import.go:112] bucket-validation-team bucket found in the cos-validation-team[ID:crn:v1:bluemix:public:cloud-object-storage:global:a/65b64c1f1c29460e8c2e4bbfbd893c2c:80104e1e-987e-4c53-9660-71783a347052::] COS instance
2020/12/04 01:45:23 the apiendpoint url for power is tor.power-iaas.cloud.ibm.com
2020/12/04 01:45:23 Calling the New Auth Method in the IBMPower Session Code
2020/12/04 01:45:23 Calling the crn constructor that is to be passed back to the caller  65b64c1f1c29460e8c2e4bbfbd893c2c
2020/12/04 01:45:23 the region is tor and the zone is  tor01
2020/12/04 01:45:23 the crndata is ... crn:v1:bluemix:public:power-iaas:tor01:a/65b64c1f1c29460e8c2e4bbfbd893c2c:e8f845fa-8caf-4228-bf1c-83dd62c57666:: 
POST /pcloud/v1/cloud-instances/e8f845fa-8caf-4228-bf1c-83dd62c57666/images HTTP/1.1
Host: tor.power-iaas.cloud.ibm.com
User-Agent: Go-http-client/1.1
Content-Length: 296
Accept: application/json
Authorization: Bearer xxxxxxx
Content-Type: application/json
Crn: crn:v1:bluemix:public:power-iaas:tor01:a/65b64c1f1c29460e8c2e4bbfbd893c2c:e8f845fa-8caf-4228-bf1c-83dd62c57666::
Accept-Encoding: gzip

{"accessKey":"xxxxx","bucketName":"bucket-validation-team","diskType":"tier3","imageFilename":"/root/rhel83-arc-dec3.ova.gz","imageName":"rhel83-arc-dec3","osType":"redhat","region":"tor01","secretKey":"xxxx","source":"url"}

HTTP/1.1 504 Gateway Time-out
Transfer-Encoding: chunked
Cache-Control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Cf-Ray: 5fc390774839ec00-BOS
Connection: keep-alive
Content-Type: text/html; charset=UTF-8
Date: Fri, 04 Dec 2020 06:49:23 GMT
Expires: Thu, 01 Jan 1970 00:00:01 GMT
Server: cloudflare
Set-Cookie: cf_ob_info=504:5fc390774839ec00:BOS; path=/; expires=Fri, 04-Dec-20 06:49:53 GMT
Set-Cookie: cf_use_ob=443; path=/; expires=Fri, 04-Dec-20 06:49:53 GMT
X-Frame-Options: SAMEORIGIN

1598
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>
<meta http-equiv="refresh" content="0">

<title>tor.power-iaas.cloud.ibm.com | 504: Gateway time-out</title>
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/main.css" type="text/css" media="screen,projection" />

</head>
<body>
<div id="cf-wrapper">

    <div id="cf-error-details" class="p-0">
        <header class="mx-auto pt-10 lg:pt-6 lg:px-8 w-240 lg:w-full mb-8">
            <h1 class="inline-block sm:block sm:mb-2 font-light text-60 lg:text-4xl text-black-dark leading-tight mr-2">

              <span class="cf-error-type">Error</span>
              <span class="cf-error-code">504</span>
            </h1>
            <span class="inline-block sm:block font-mono text-15 lg:text-sm lg:leading-relaxed">Ray ID: 5fc390774839ec00 &bull;</span>
            <span class="inline-block sm:block font-mono text-15 lg:text-sm lg:leading-relaxed">2020-12-04 06:49:23 UTC</span>
            <h2 class="text-gray-600 leading-1.3 text-3xl font-light">Gateway time-out</h2>
        </header>

        <div class="my-8 bg-gradient-gray">
            <div class="w-240 lg:w-full mx-auto">
                <div class="clearfix md:px-8">

<div id="cf-browser-status" class=" relative w-1/3 md:w-full py-15 md:p-0 md:py-8 md:text-left md:border-solid md:border-0 md:border-b md:border-gray-400 overflow-hidden float-left md:float-none text-center">
  <div class="relative mb-10 md:m-0">
    <span class="cf-icon-browser block md:hidden h-20 bg-center bg-no-repeat"></span>
    <span class="cf-icon-ok w-12 h-12 absolute left-1/2 md:left-auto md:right-0 md:top-0 -ml-6 -bottom-4"></span>
  </div>
  <span class="md:block w-full truncate">You</span>
  <h3 class="md:inline-block mt-3 md:mt-0 text-2xl text-gray-600 font-light leading-1.3">Browser</h3>
  <span class="leading-1.3 text-2xl text-green-success">Working</span>
</div>

<div id="cf-cloudflare-status" class=" relative w-1/3 md:w-full py-15 md:p-0 md:py-8 md:text-left md:border-solid md:border-0 md:border-b md:border-gray-400 overflow-hidden float-left md:float-none text-center">
  <div class="relative mb-10 md:m-0">
    <span class="cf-icon-cloud block md:hidden h-20 bg-center bg-no-repeat"></span>
    <span class="cf-icon-ok w-12 h-12 absolute left-1/2 md:left-auto md:right-0 md:top-0 -ml-6 -bottom-4"></span>
  </div>
  <span class="md:block w-full truncate">Boston</span>
  <h3 class="md:inline-block mt-3 md:mt-0 text-2xl text-gray-600 font-light leading-1.3">Cloudflare</h3>
  <span class="leading-1.3 text-2xl text-green-success">Working</span>
</div>

<div id="cf-host-status" class="cf-error-source relative w-1/3 md:w-full py-15 md:p-0 md:py-8 md:text-left md:border-solid md:border-0 md:border-b md:border-gray-400 overflow-hidden float-left md:float-none text-center">
  <div class="relative mb-10 md:m-0">
    <span class="cf-icon-server block md:hidden h-20 bg-center bg-no-repeat"></span>
    <span class="cf-icon-error w-12 h-12 absolute left-1/2 md:left-auto md:right-0 md:top-0 -ml-6 -bottom-4"></span>
  </div>
  <span class="md:block w-full truncate">tor.power-iaas.cloud.ibm.com</span>
  <h3 class="md:inline-block mt-3 md:mt-0 text-2xl text-gray-600 font-light leading-1.3">Host</h3>
  <span class="leading-1.3 text-2xl text-red-error">Error</span>
</div>

                </div>

            </div>
        </div>

        <div class="w-240 lg:w-full mx-auto mb-8 lg:px-8">
            <div class="clearfix">
                <div class="w-1/2 md:w-full float-left pr-6 md:pb-10 md:pr-0 leading-relaxed">
                    <h2 class="text-3xl font-normal leading-1.3 mb-4">What happened?</h2>
                    <p>The web server reported a gateway time-out error.</p>
                </div>

                <div class="w-1/2 md:w-full float-left leading-relaxed">
                    <h2 class="text-3xl font-normal leading-1.3 mb-4">What can I do?</h2>
                    <p class="mb-6">Please try again in a few minutes.</p>
                </div>
            </div>

        </div>

        <div class="cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t border-gray-300">
  <p class="text-13">
    <span class="cf-footer-item sm:block sm:mb-1">Cloudflare Ray ID: <strong class="font-semibold">5fc390774839ec00</strong></span>
    <span class="cf-footer-separator sm:hidden">&bull;</span>
    <span class="cf-footer-item sm:block sm:mb-1"><span>Your IP</span>: 129.42.208.184</span>
    <span class="cf-footer-separator sm:hidden">&bull;</span>
    <span class="cf-footer-item sm:block sm:mb-1"><span>Performance &amp; security by</span> <a rel="noopener noreferrer" href="https://www.cloudflare.com/5xx-error-landing" id="brand_link" target="_blank">Cloudflare</a></span>

  </p>
</div><!-- /.error-footer -->

    </div>
</div>
</body>
</html>

0

Error: unknown error (status 504): {resp:0xc0008e2000} 
E1204 01:49:28.331523  881720 root.go:49] unknown error (status 504): {resp:0xc0008e2000} 
mkumatag commented 3 years ago

/kind bug /assign @bkhadars

Here is my observation:

  1. Object name does not exist in this path - /root/rhel83-arc-dec3.ova.gz, actually an object name is rhel83-arc-dec3.ova.gz, @bkhadars need to check if object present before calling the image creation
  2. Not sure if powervs import image really works even if there is an object exist in that path in the bucket
mkumatag commented 3 years ago

This was happening due to an invalid region passed for the cloud storage, after passing the right region import went through without any issues

mkumatag commented 3 years ago

lowering the priority for the message correction

/priority important-longterm