Bug 1317529 - names of RHEV vms are created with hyphens rather than dots
Summary: names of RHEV vms are created with hyphens rather than dots
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Compute Resources
Version: 6.1.7
Hardware: All
OS: Linux
unspecified
high vote
Target Milestone: Unspecified
Assignee: Ivan Necas
QA Contact: Lukáš Hellebrandt
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks: GSS_Sat6Beta_Tracker, GSS_Sat6_Tracker 1317530
TreeView+ depends on / blocked
 
Reported: 2016-03-14 13:23 UTC by Julio Entrena Perez
Modified: 2021-06-10 11:12 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:31:58 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 10278 0 None None None 2016-03-14 13:41:38 UTC
Red Hat Knowledge Base (Solution) 2198081 0 None None None 2016-03-14 13:53:26 UTC

Description Julio Entrena Perez 2016-03-14 13:23:43 UTC
Description of problem:
When creating a new host ("hosta") in a RHEV compute resource using a specific domain ("example.com") the RHEV VM is named "hosta-example-com" rather than "hosta.example.com".

Version-Release number of selected component (if applicable):
6.1.7

How reproducible:
Always

Steps to Reproduce:
1. Create a new host ("hosta") on a RHEV compute resource using an existing template
2.
3.

Actual results:
RHEV VM is named "hosta-example-com"

Expected results:
RHEV VM is named "hosta.example.com"

Additional info:

Comment 1 Julio Entrena Perez 2016-03-14 13:46:03 UTC
See related foreman issue http://projects.theforeman.org/issues/10278 .
RHEV accepts dots for VM names since RHEV 3.1, see https://access.redhat.com/solutions/138643 .
Consequently the following patch could be reverted:
https://github.com/theforeman/foreman/blob/1.8.0-RC3/app/models/compute_resources/foreman/model/ovirt.rb#L139-L140

Comment 2 Julio Entrena Perez 2016-03-17 10:43:42 UTC
In file /usr/share/foreman/app/models/compute_resources/foreman/model/ovirt.rb :

  139     def create_vm(args = {})
* 140       #ovirt doesn't accept '.' in vm name.
* 141       args[:name] = args[:name].parameterize
  142       if (image_id = args[:image_id])

Customer confirms that removing lines 140 and 141 results in VM names being created with dots (hosta.example.com).

Comment 3 Julio Entrena Perez 2016-04-05 09:50:42 UTC
Increasing severity since this affects all RHEV VMs created from Satellite that include dots in the name.

Comment 4 Bryan Kearney 2016-04-05 19:47:34 UTC
Connecting redmine issue http://projects.theforeman.org/issues/10278 from this bug

Comment 8 Ivan Necas 2016-04-11 15:35:03 UTC
The patch against foreman opened to fix the issue https://github.com/theforeman/foreman/pull/3415

Comment 9 Bryan Kearney 2016-04-12 14:11:41 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/10278 has been closed
-------------
Dominic Cleal
https://github.com/theforeman/foreman/blob/1.8.0-RC3/app/models/compute_resources/foreman/model/ovirt.rb#L139-L140 is responsible, for reference.
-------------
Ivan Necas
Applied in changeset commit:cf826485d252e8f1d7fee7209c561751915ea338.

Comment 12 Lukáš Hellebrandt 2017-10-04 12:51:45 UTC
Verified with Sat6.3 snap 18.

Creating RHEV guests from Create Host dialog results in guests with dots in their name (rather than replacing dots with hyphens). The systems are indeed created also in Satellite and they can be power managed.

This seems to work, just note this actually changes behavior observable by customers and can, for example, break some of ther scripts. This is, however, expected as per comment 7.

Comment 13 Djebran Lezzoum 2017-12-15 07:53:29 UTC
qe_test_coverage PR: https://github.com/SatelliteQE/robottelo/pull/5692

Comment 14 Bryan Kearney 2018-02-21 16:31:58 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.

For information on the advisory, and where to find the updated files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:0336


Note You need to log in before you can comment on or make changes to this bug.