Skip to content
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

image import fails with service instance not found when name is passed #571

Open
Amulyam24 opened this issue Mar 5, 2024 · 7 comments
Open
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@Amulyam24
Copy link
Contributor

Amulyam24 commented Mar 5, 2024

What happened:
Image import to a PowerVS service instance fails when name is passed with instance not found error and succeeds when ID is passed.

What you expected to happen:
Image import to succeed

How to reproduce it (as minimally and precisely as possible):

export IBMCLOUD_API_KEY=<>
pvsadm image import -n ibm-pvs-3-serviceInstance -b power-oss-bucket -o capibm-powervs-centos-streams8-1-28-4.ova.gz -r us-south  --pvs-image-name capibm-powervs-centos-streams8-1-28-4 --public-bucket
Error: instance: ibm-pvs-3-serviceInstance not found

Anything else we need to know?:
On enabling debug logs, I could see that search with name passed via -n(indicating name of the PowerVS service instance) is being searched against COS instances. Sample output:

I0229 01:22:24.762968  145132 pvmclient.go:69] Service ID: c2e6f56f-f292-4cf3-b5a4-6ff8ef5892dd, region_id: global, Name: dhar-hyp-iks-cos
I0229 01:22:24.762997  145132 pvmclient.go:70] crn: crn:v1:bluemix:public:cloud-object-storage:global:a/c265c8cefda241ca9c107adcbbacaa84:c2e6f56f-f292-4cf3-b5a4-6ff8ef5892dd::
I0229 01:22:24.763020  145132 pvmclient.go:69] Service ID: f05943b1-fc01-45ae-9ad6-9fe4d4a44b92, region_id: global, Name: power-images-cos
I0229 01:22:24.763031  145132 pvmclient.go:70] crn: crn:v1:bluemix:public:cloud-object-storage:global:a/c265c8cefda241ca9c107adcbbacaa84:f05943b1-fc01-45ae-9ad6-9fe4d4a44b92::
I0229 01:22:24.763044  145132 pvmclient.go:69] Service ID: 23286650-4fab-4433-bd88-e4626c280867, region_id: jp-tok, Name: logs-tokyo-Zo
...

Ideally shouldn't it list and search against the PowerVS service instances?

Environment:

  • pvsadm version (use pvsadm version): latest build from main
  • Environment - On-Prem or IBM PowerVS: IBM PowerVS
  • OS (e.g: cat /etc/os-release): CentOS Stream 9
  • Kernel (e.g. uname -a): 5.14.0
  • Others:
@Amulyam24 Amulyam24 added the kind/bug Categorizes issue or PR as related to a bug. label Mar 5, 2024
@Amulyam24
Copy link
Contributor Author

/cc @KeerthanaAP @kishen-v

@KeerthanaAP
Copy link
Contributor

@Amulyam24

I tried importing image using the service instance name option with latest code and didn't face this issue.

 % ./pvsadm image import -n rdr-openshift-dev -b power-oss-bucket -o capibm-powervs-centos-streams8-1-28-4.ova.gz -r us-south  --pvs-image-name capibm-powervs-centos-streams8-1-28-4 --public-bucket -k <key>
I0306 15:17:17.885490   21102 import.go:203] Image Import Job in-progress, current state: queued
I0306 15:19:20.997993   21102 import.go:203] Image Import Job in-progress, current state: running
I0306 15:21:19.587298   21102 import.go:203] Image Import Job in-progress, current state: running
I0306 15:23:20.259771   21102 import.go:203] Image Import Job in-progress, current state: running
I0306 15:25:20.378923   21102 import.go:203] Image Import Job in-progress, current state: running
I0306 15:27:19.853301   21102 import.go:203] Image Import Job in-progress, current state: running
I0306 15:29:19.326709   21102 import.go:203] Image Import Job in-progress, current state: running
I0306 15:31:24.298760   21102 import.go:220] Retriving image details
I0306 15:31:24.298821   21102 import.go:224] Importing Image capibm-powervs-centos-streams8-1-28-4 is currently in active state, Please check the Progress in the IBM Cloud UI

@Amulyam24
Copy link
Contributor Author

Thank you for verifying it @KeerthanaAP, I will retry and let you know.

@mkumatag
Copy link
Member

mkumatag commented Mar 7, 2024

@Amulyam24 how machine service instances you have in your account, hope we aren't dealing with the paging issue here?!

@KeerthanaAP lets check if we are handling the paging properly or not.

@Amulyam24
Copy link
Contributor Author

Amulyam24 commented Mar 7, 2024

@Amulyam24 how machine service instances you have in your account, hope we aren't dealing with the paging issue here?!

@mkumatag, currently, the number of service instances in the account are less than 10 accommodated within a page.

@KeerthanaAP, I was able to import it to the same instance you mentioned rdr-openshift-dev by passing name
However, I haven't been successful with the other instances.

Created a new PowerVS service instance called test-instance as shown below
Screenshot 2024-03-07 at 3 17 44 PM

 pvsadm image import -n test-instance -b power-oss-bucket -o capibm-powervs-centos-streams8-1-28-4.ova.gz -r us-south --pvs-image-name capibm-image --public-bucket
Error: instance: test-instance not found

# Image import passed when ID is passed
pvsadm image import -i 4184a31d-803c-400f-8afb-c8d144e0e411 -b power-oss-bucket -o capibm-powervs-centos-streams8-1-28-4.ova.gz -r us-south --pvs-image-name capibm-image --public-bucket
I0307 04:46:47.718238  207256 import.go:203] Image Import Job in-progress, current state: queued

Same issue occurs when I try with capi-pvs-21-serviceInstance

@mkumatag
Copy link
Member

mkumatag commented Mar 8, 2024

Interesting, lets debug further..

@KeerthanaAP
Copy link
Contributor

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants