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

ntnx_images: uploaded image size shows empty in Prism central #355

Closed
sivaxsan opened this issue Apr 14, 2023 · 16 comments
Closed

ntnx_images: uploaded image size shows empty in Prism central #355

sivaxsan opened this issue Apr 14, 2023 · 16 comments
Assignees

Comments

@sivaxsan
Copy link

sivaxsan commented Apr 14, 2023

Describe the bug
Uploaded image from local workstation size shows empty in prism central ; but if I upload the image via prism central GUI - it shows correct image size.

Note: Image has been created via redhat image builder

To Reproduce
Steps to reproduce the behavior:

  • name: Get Image
    hosts: localhost
    gather_facts: no
    module_defaults:
    group/nutanix.ncp.ntnx:
    nutanix_host: "{{ cluster_url }}"
    nutanix_username: "{{ prism_user }}"
    nutanix_password: "{{ prism_password }}"
    vars_files: nutanix_vars.yml
    tasks:
    • name: List images using name filter criteria
      nutanix.ncp.ntnx_images:
      state: "present"
      source_path: "/var/tmp/7f7bfb3a-6775-4e5a-b5f2-cc648ad77e77-disk.qcow2"
      validate_certs: False
      clusters:
      - name: "******"
      categories:
      AppFamily:
      - Backup
      name: "rhel_8_test_4"
      desc: "description"
      image_type: "DISK_IMAGE"
      wait: true
      register: result

    • name: print value
      debug:
      msg: '{{ result }}'

Stack trace

Expected behavior
A clear and concise description of what you expected to happen.
image upload with correct image size .

Additional context
Add any other context about the problem here.

@sivaxsan sivaxsan added the bug Something isn't working label Apr 14, 2023
@sivaxsan
Copy link
Author

sivaxsan commented Apr 14, 2023

tried alternate option for source.

using source_uri:
but getting
fatal: [localhost]: FAILED! => {
"changed": false,

@sivaxsan
Copy link
Author

sivaxsan commented Apr 14, 2023

my code:

  • name: List images using name filter criteria
    nutanix.ncp.ntnx_images:
    state: "present"
    source_uri: "https://********/build/RedHat/8/images/rhel-8.7-x86_64-kvm.qcow2"
    validate_certs: false
    name: "rhel_8_test_4"
    desc: "description"
    image_type: "DISK_IMAGE"
    wait: true
    register: result

@sivaxsan
Copy link
Author

as I declared validate_certs is false, not sure, why still it looking for peer's certificate.

@bhati-pradeep
Copy link
Collaborator

hi @sivaxsan, can you share Prism Central and Nutanix Ansible version you are using ? I can check.

@sivaxsan
Copy link
Author

Hi ,

Ansible version is : core 2.13.5
Prism Central version is : 2022.6
NCC version: 4.6.0.1
LCM version : 2.6.0.1

Note: If I use REST API - upload image size shows correct size.

Thanks
Siva

@bhati-pradeep
Copy link
Collaborator

Hi @sivaxsan, Can you share response of playbook task once task finishes. You can mask sensitive details.
I tried in my local and it works fine for me. Wanted to check size attribute in response. Thanks.

@bhati-pradeep
Copy link
Collaborator

bhati-pradeep commented Apr 27, 2023

Also if size never comes in the UI or it comes after some time ?

@sivaxsan
Copy link
Author

Image size never comes shows in the UI. I couldn't use public github in my office laptop. so, it is difficult to update the logs. Also, playbook doesn't shows any errors and it completed successfully.

As I observed, couldn't see any issues , if I use RESTAPI and able to see the image size and use it for OS build.

nutanix.ncp.ntnx_images: : plays shows successful, but doesn't show image size and couldn't able to use it for OS build.

@bhati-pradeep
Copy link
Collaborator

bhati-pradeep commented Apr 27, 2023

Are you able to create VM from image ?

@bhati-pradeep
Copy link
Collaborator

If you can print result of task. Check you check response.status.resources.size_bytes is set or not.

@sivaxsan
Copy link
Author

Hi, response.status.resources shows only below options:

resources: {
architecture: x86_84
image_type: DISK IMAGE
}
state : Complete

I couldn't see size_bytes in the output

@bhati-pradeep
Copy link
Collaborator

bhati-pradeep commented Apr 27, 2023

hi @sivaxsan, Can you create nutanix support ticket ? This will need a call for for more debugging.

@sivaxsan
Copy link
Author

I already raised a case with Nutanix, they advised to raise a issue in nutanix.ansible git repo. Nutanix case: 01435754 [As they mentioned : Issue relates open source project actively maintained by Nutanix, and will get support directly from github

@bhati-pradeep
Copy link
Collaborator

bhati-pradeep commented Apr 27, 2023

Okay. Let me get back to you with more details and will try to reproduce on my local setup as well.

@bhati-pradeep bhati-pradeep added the 1.9.1 Bug fixes & Improvements label Sep 25, 2023
@bhati-pradeep
Copy link
Collaborator

bhati-pradeep commented Nov 9, 2023

@sivaxsan Are you still facing this issue ?

@bhati-pradeep bhati-pradeep removed bug Something isn't working 1.9.1 Bug fixes & Improvements labels Sep 18, 2024
@bhati-pradeep
Copy link
Collaborator

Closing this ticket due to inactivity. Please reopen if you face it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants