Bug 1317529

Summary: names of RHEV vms are created with hyphens rather than dots
Product: Red Hat Satellite Reporter: Julio Entrena Perez <jentrena>
Component: Compute ResourcesAssignee: Ivan Necas <inecas>
Status: CLOSED ERRATA QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.1.7CC: bbuckingham, bkearney, cwelton, dlezzoum, inecas, jentrena, lhellebr, pdwyer, sjagtap
Target Milestone: UnspecifiedKeywords: EasyFix, Patch, Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
URL: http://projects.theforeman.org/issues/10278
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:31:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1115190, 1317530    

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