Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1463896 - the configuration script should put warning to /etc/sysconfig/virt-who that users shouldn't modify it manually
Summary: the configuration script should put warning to /etc/sysconfig/virt-who that u...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Virt-who Configure Plugin
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Marek Hulan
QA Contact: Evgeni Golov
satellite-doc-list
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-22 03:50 UTC by Eko
Modified: 2019-04-01 20:27 UTC (History)
13 users (show)

Fixed In Version: foreman_virt_who_configure-0.1.5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 20296 0 None None None 2017-07-13 11:02:48 UTC

Description Eko 2017-06-22 03:50:17 UTC
When using the virt-who configuration plugin to create a script, but if we run it on the target host, it will delete other options /etc/sysconfig/virt-who, only keep the below options:
VIRTWHO_SATELLITE6=1
VIRTWHO_DEBUG=1
VIRTWHO_INTERVAL=3600


Expected results:
Other options are still necessary to keep

Comment 1 Marek Hulan 2017-06-22 08:47:58 UTC
Thanks for the report, What options are necessary and why? It seems the only uncommented value after default installation is "VIRTWHO_DEBUG=0". Maybe the file should contain some comment about that it was generated by the configuration plugin.

Comment 2 Eko 2017-06-22 09:15:10 UTC
I'm afraid if the customers want to set the options by self, such as running hypervisor mode or running for satellite5 by /etc/sysconfig/virt-who, they don't know which options are supported any more. 

VIRTWHO_ESX=1
VIRTWHO_ESX_OWNER=
VIRTWHO_ESX_ENV=
VIRTWHO_ESX_SERVER=
VIRTWHO_ESX_USERNAME=
VIRTWHO_ESX_PASSWORD=

# Options for Satellite 5 backend
VIRTWHO_SATELLITE5=1
VIRTWHO_SATELLITE_SERVER=
VIRTWHO_SATELLITE_USERNAME=
VIRTWHO_SATELLITE_PASSWORD=

Comment 3 Marek Hulan 2017-06-22 10:32:40 UTC
I don't think people would try to combine manual and plugin configuration. Would the warning comment on top of the file, that this file is managed by the virt-who-configure plugin, make it clearer?

If customers wants to add new esx hypervisor, they should use the plugin that creates config file in /etc/virt-who.d for it.

If users manually modify configuration that was created by the plugin, it kind of voids the warranty that the configuration is correct.

Comment 4 Eko 2017-06-23 02:52:06 UTC
Hi Chris,

What's your opinion?

is it possible to keep only global options in /etc/sysconfig/virt-who? thus, the hypervisor modes only can be run by CLI or /etc/virt-who.d/xxx.conf

Comment 5 Marek Hulan 2017-06-23 06:38:48 UTC
From my basic knowledge, there's no way to specify interval or debug option in virt-who.d config file. I'd be happy to avoid touching /etc/sysconfig/virt-who if that's possible.

Comment 6 Chris Snyder 2017-07-11 17:19:36 UTC
There are three ways to set the interval:

setting VIRTWHO_INTERVAL to an int in /etc/sysconfig (as is already being done)

OR

setting the '-i' or '--interval' option when running virt-who via the CLI.

OR

setting 'interval' in the '[global]' section of /etc/virt-who.conf to an int.



They are equivalent in function.


We'll have to ask Rich Jerrido but I am under the impression that enough customers configure virt-who using the other values in /etc/sysconfig/virt-who that we should still support them.

Rich thoughts on the above?


Marek,

I would also ask, what happens when one runs two scripts generated by the virt-who satellite plugin on the same system? I would presume that the global values set in the script run last on the system would be the ones that remain.

Cheers,
Chris

Comment 7 Rich Jerrido 2017-07-11 23:37:27 UTC
In a Satellite 6.x use-case with the configuration script, I would treat the configurations that are in /etc/sysconfig/virt-who AND /etc/virt-who.d/* as being 'owned' by the configuration script.

Outside of the options listed in comment #0 (shown below), I can't think of any needed. (most of the /etc/sysconfig/virt-who options can be also/alternatively be set in /etc/virt-who.d/).

VIRTWHO_SATELLITE6=1
VIRTWHO_DEBUG=1
VIRTWHO_INTERVAL=3600

Basically, I'd be OK with us placing a notice in the config file similar to 


### This configuration managed via the virt-who plugin
### manual edits will be deleted. 



I would like to take the stance (and I think we should document it as such) that virt-who configurations that are managed via the virt-who plugin, should SOLELY be managed by the virt-who plugin. 

This is similar to any other configuration file managed by the installer/application.

Comment 8 Marek Hulan 2017-07-13 11:01:02 UTC
Thanks Chris. So until there's a way to have different interval per worker, I think changing /etc/sysconfig/virt-who is the best option at the moment. I agree with what Rich described, so I'll add the comment in to the top of the file.

You're right about two configurations overriding the same value. Since there's no way to set different interval per hypervisor, we'll have to live with it for now. Hopefully people will use recommended value and keep the default interval. I don't see any RFE for virt-who to enable different intervals per hypervisor, should I open one against virt-who?

Comment 9 Marek Hulan 2017-07-13 11:02:44 UTC
Created redmine issue http://projects.theforeman.org/issues/20296 from this bug

Comment 10 Marek Hulan 2017-08-14 20:04:53 UTC
Bryan, I'm lowering the priority. As per comment 7, we should only provide a comment into the config file so people are warned if they are modifying the config file manually. Please reset if you think it's still high priority.

Comment 12 Evgeni Golov 2017-08-30 09:54:12 UTC
VERIFIED

Version tested:
Satellite 6.3 Snap 13
tfm-rubygem-hammer_cli_foreman_virt_who_configure-0.0.3-1.el7sat.noarch
tfm-rubygem-foreman_virt_who_configure-0.1.5-1.fm1_15.el7sat.noarch

* created a new virt-who config in the WebUI
* hammer virt-who-config deploy --id 1
* head -n2 /etc/virt-who.d/virt-who-config-1.conf 
### This configuration file is managed via the virt-who configure plugin
### manual edits will be deleted.
* # head -n2 /etc/sysconfig/virt-who 
### This configuration file is managed via the virt-who configure plugin
### manual edits will be deleted.

Comment 13 Satellite Program 2018-02-21 16:54:17 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.