Project

General

Profile

Bug #25281

Unable to provision a host, if RHV resource created through CLI

Added by Shira Maximov about 2 years ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Compute resources - oVirt
Target version:
-
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1637883

Description of problem:
Using the CLI workflow to create a host from CLI
Version-Release number of selected component (if applicable):

How reproducible:
Always

Steps to Reproduce:
1. Create a RHV CR from CLI
2018-10-10 14:43:34 - robottelo.ssh - DEBUG - Instantiated Paramiko client 0x7fa52940eac8
2018-10-10 14:43:34 - robottelo.ssh - INFO - Connected to [qe-sat6-feature-rhel7.domain]
2018-10-10 14:43:34 - robottelo.ssh - INFO - >>> b'LANG=en_US.UTF-8 hammer -v -u admin -p changeme --output=csv compute-resource create --name="z12z" --provider="Ovirt" --user="admin@internal" --password="pass" --datacenter="Satellite-Engineering" --url="https://rhv-host/ovirt-engine/api" --ovirt-quota="Default" --locations="RSRdxdPDTj" --organizations="AFPqwGOhDd"'
2018-10-10 14:43:38 - robottelo.ssh - INFO - <<< stdout
Message,Id,Name
Compute resource created.,4,z12z
2018-10-10 14:43:38 - robottelo.ssh - DEBUG - Destroyed Paramiko client 0x7fa52940eac8
2018-10-10 14:43:41 - robottelo.ssh - DEBUG - Instantiated Paramiko client 0x7fa537e2ffd0
2018-10-10 14:43:41 - robottelo.ssh - INFO - Connected to [qe-sat6-feature-rhel7.domain]
2018-10-10 14:43:41 - robottelo.ssh - INFO - >>> b'LANG=en_US.UTF-8 hammer -v -u admin -p changeme compute-resource info --id="4"'
2018-10-10 14:43:43 - robottelo.ssh - INFO - <<< stdout
Id: 4
Name: z12z
Provider: RHV
Url: https://rhv-host/ovirt-engine/api
Description:
User: admin@internal
Locations:
RSRdxdPDTj
Organizations:
AFPqwGOhDd
Created at: 2018/10/10 09:13:37
Updated at: 2018/10/10 09:13:37
Datacenter: Satellite-Engineering

2. Try to create a host on the create resource

hammer -v -u admin -p changeme --output=csv host create --compute-attributes="cluster=5aaaaa41-02db-027c-0190-0000000001c8,cores=1,memory=1073741824,start=1" --compute-resource-id="4" --hostgroup="KVcRoBH" --interface="compute_name=nic1, compute_network=2d7dc335-a881-44ce-aa17-46ebdd4dcb58" --location="RSRdxdPDTj" --name="new-host" --organization="AFPqwGOhDd" --provision-method="build" --root-password="dog8code" --volume="size_gb=10,storage_domain=c4fc24ba-651a-4db6-a137-c5ad8a4a921f,bootable=True"
[ERROR 2018-10-10T05:14:37 API] 422 Unprocessable Entity
[ERROR 2018-10-10T05:14:37 Exception] Failed to create a compute z12z (RHV) instance new-host.domain: Ovirt client returned an error: 500 Internal Server Error

Could not create the host:
Failed to create a compute z12z (RHV) instance new-host.domain: Ovirt client returned an error: 500 Internal Server Error

3. Go to UI to check the create compute resource
Wrong Datacenter is selected with no quota

Actual results:
Cannot create the host when Compute resource is created from Hammer CLI

Expected results:
Host should be created, Compute resource should have all parameter specified in CLI

Additional info:
Workaround: Go to UI, fix the created CR with appropriate Datacenter and quota
re-run the create Command for host


Related issues

Related to Hammer CLI - Bug #28464: help message does not support attributes names in ovirtClosed
Has duplicate Foreman - Bug #28450: Non-indicative error shows when creating an ovirt host with a bad storage-domain id Closed

Associated revisions

Revision 5fb662f4 (diff)
Added by yifat makias 11 months ago

Fixes #25281,#27002 - support passing names in ovirt

History

#1 Updated by Lukas Zapletal almost 2 years ago

  • Triaged changed from No to Yes
  • Difficulty set to trivial

Easy bug for newcomers, a parameter gets lost along the way from Hammer via API to database.

#2 Updated by Ori Rabin over 1 year ago

  • Bugzilla link changed from 1637883 to 1685949
  • Difficulty deleted (trivial)

Not a easy bug, supporting names instead of ids for quota, network and storage_domain.

#3 Updated by yifat makias about 1 year ago

  • Assignee set to yifat makias
  • Status changed from New to Assigned

#4 Updated by The Foreman Bot 12 months ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/7144 added

#5 Updated by yifat makias 11 months ago

  • Has duplicate Bug #28450: Non-indicative error shows when creating an ovirt host with a bad storage-domain id added

#6 Updated by yifat makias 11 months ago

  • Related to Bug #28464: help message does not support attributes names in ovirt added

#7 Updated by The Foreman Bot 11 months ago

  • Fixed in Releases 2.0.0 added

#8 Updated by yifat makias 11 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF