Bug 723115 - kernel params are not always removed from line after registering to RHEV-M
Summary: kernel params are not always removed from line after registering to RHEV-M
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ovirt-node
Version: 6.1
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Mike Burns
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 737722
TreeView+ depends on / blocked
 
Reported: 2011-07-19 06:25 UTC by Pavel Stehlik
Modified: 2011-12-06 19:18 UTC (History)
9 users (show)

Fixed In Version: ovirt-node-2.0.2-0.10.gitee3b50c.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 737722 (view as bug list)
Environment:
Last Closed: 2011-12-06 19:18:28 UTC
Target Upstream Version:


Attachments (Terms of Use)
Patch (1.59 KB, patch)
2011-09-12 23:19 UTC, Mike Burns
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1783 0 normal SHIPPED_LIVE rhev-hypervisor6 bug fix and enhancement update 2011-12-06 15:10:54 UTC

Description Pavel Stehlik 2011-07-19 06:25:41 UTC
Description of problem:
 This BZ is holder for issue - when I installed rhev-h-6.2-0.5.iso, I used management_server=IP:8443 & management_server_fingerprint=my:fp:... clauses. In this case vdsm-reg fetch wrong ca.crt (it looks it at   http://IP:8443/ca.crt). After approval the install failed. Then I changed port => 8080 in vdsm-reg.conf & restart vdsm-reg service, then host was installed successfully. 
 The problem is, that kernel param management_server & management_server_fingerprint stays there.

Version-Release number of selected component (if applicable):
rhev-h-6.2-0.5.iso

How reproducible:
100%

Steps to Reproduce:
1. pls read description
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 Mike Burns 2011-07-22 19:39:58 UTC
The only options that are removed from the boot command line are ones that are explicitly handled in ovirt-early.  The management_server option is part of the vdsm plugin and I'm not aware of the management_server_fingerprint option at all.  

Having these in the boot line does not hurt anything.  

The tricky thing is that there isn't a way for something like vdsm to tell ovirt what parameters it's expecting.

One possible solution:  

vdsm (or other plugins) write a file in /etc/ovirt-early.d called something like
vdsm-ignore-parameters

When processing commandline arguments, ovirt-early, reads all files that match the pattern /etc/ovirt-early.d/*-ignore-parameters and ignores all entries in those files.  

Alan,

Does the above make sense for the plugin architecture?

Comment 3 Alan Pevec 2011-07-25 00:05:50 UTC
management_server_fingerprint is new vdsm-reg parameter, for checking rhevm cert

> Having these in the boot line does not hurt anything.  

Unless you want to change it: vdsm-config always overwrites values in vdsm-reg.conf by those specified in boot parameters.
 
> Does the above make sense for the plugin architecture?

Yeah, we'll need something like you described, but for now it's not a high priority.

Comment 6 Mike Burns 2011-09-12 23:19:04 UTC
Created attachment 522830 [details]
Patch

Add a directory on ovirt-node called /etc/ovirt-commandline.d where plugins and/or packages can place a file containing a list of command line variables to ignore when setting up the boot params for subsequent boots.

Comment 7 Alan Pevec 2011-09-13 06:40:16 UTC
-            if ! grep -qw /etc/ovirt-commandline.d/*; then
+            if ! grep -qw $varname /etc/ovirt-commandline.d/*; then

Comment 8 Mike Burns 2011-09-13 10:54:04 UTC
(In reply to comment #7)
> -            if ! grep -qw /etc/ovirt-commandline.d/*; then
> +            if ! grep -qw $varname /etc/ovirt-commandline.d/*; then

Oops, dumb mistake, fixed in git but no need to post new patch

Comment 12 Mike Burns 2011-10-03 16:12:15 UTC
Add additional cleanup patch to suppress errors if there are not files in /etc/ovirt-commandline.d


diff --git a/scripts/ovirt-early b/scripts/ovirt-early
index df3b0cd..28ebd05 100755
--- a/scripts/ovirt-early
+++ b/scripts/ovirt-early
@@ -653,7 +653,7 @@ start_ovirt_early () {
             *)
             # check the params to be ignored before adding to bootparams
             varname=${i%=*}
-            if ! grep -qw $varname /etc/ovirt-commandline.d/*; then
+            if ! grep -qw $varname /etc/ovirt-commandline.d/* 2>/dev/null; then
                 bootparams="$bootparams $i"
             fi
             ;;

Comment 18 errata-xmlrpc 2011-12-06 19:18:28 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.

http://rhn.redhat.com/errata/RHBA-2011-1783.html


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