Bug 839814 - 3.1 - rhev-h admin tui does not update vdsm-reg.conf
3.1 - rhev-h admin tui does not update vdsm-reg.conf
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: vdsm (Show other bugs)
6.2
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Douglas Schilling Landgraf
Pavel Stehlik
infra
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-12 19:00 EDT by Marina
Modified: 2016-04-26 10:21 EDT (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-03 19:16:41 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marina 2012-07-12 19:00:16 EDT
Description of problem:
rhev-h admin tui does not update vdsm-reg.conf.

Version-Release number of selected component (if applicable):
6.2-20120510.0.el6_2

How reproducible:
always

Steps to Reproduce:
1. login to rhev-h admin tui with admin user
2. navigate to RHEV-M screen and update rhev-m info - hostname and ip (or just one of them)
3. navigate to <Apply> and click enter
  
Actual results:
Message "Failed downloading RHEV-M certificate" -> "RHEV-M configuration failed."
Checking /etc/vdsm-reg/vdsm-reg.conf
vdc_host_port and vdc_host_name fields are not updated.

Expected results:
/etc/vdsm-reg/vdsm-reg.conf is updated with new fields.

Additional info:
Workaround - manually edit the file with correct values.
Comment 2 Mike Burns 2012-07-12 19:13:25 EDT
While I strongly feel this is NOTABUG, I'll defer to the vdsm team.  The particular screen in the TUI is owned by vdsm.

Reason I think it's not a bug:

If the check box for "download and verify RHEV-M certificate" is checked, then configuration can't continue if the certificate isn't verified.  Since, in this case, it wasn't successfully downloaded, the verification can't pass, so configuration can't continue.

Assuming that you have configured everything correctly, there is something else going on if we can't download the certificate.  If you want to avoid that check, you can simply uncheck the box.
Comment 3 Marina 2012-07-12 19:21:30 EDT
Even with unchecking this option, it fails to save the configuration and the file is not updated. 

While with this option checked, it keeps the values on the TUI (like it is configured), but they never reflected on vdsm-reg.conf.
Comment 4 Barak 2012-07-15 11:55:24 EDT
Marina,

What was the exact scenario ? initial installation ? or just trying to change the rhevm settings in rhevh ?
Comment 5 Marina 2012-07-16 12:28:56 EDT
It happened to me in 2 different scenarios:
I. 
Host was upgraded from one 3.0 version to another. 
It was attached to RHEV-M_1.
I removed the host from RHEV-M_1 and wanted to add it to RHEV-M_2.
I was failing doing it via Admin Tui, till I figured out that the actual vdsm-reg.conf is not updated.

II. 
Totally new installation of RHEV-H.
Networking was configured successfully.
I tried to add the Manager screen to add the host to RHEV-M.
Failed, as described on the bug.

RHEV-H version is same on both scenarios: 6.2-20120510.0.el6_2.

BTW, this is my host, I can provide access if needed, if not reproducing in home.
Comment 6 Bryan Yount 2012-07-17 17:41:18 EDT
I encountered something similar on this same host actually:

1. I put the system into maintenance mode and rebooted it
2. When it booted back up and I clicked Activate, it went Non-responsive
3. I logged into the admin console and the NIC device was set to Disabled even though it had the correct IP address

│   IPv4 ettings                                           │ 
│   [*] Disabled [ ] DHCP [ ] Static                       │ 
│   IP Address: 10.12.52.76_____ Netmask: 255.255.252.0___ │ 
│   Gateway:    10.12.55.254____    

4. So then I tried removing it from RHEV-M and running "service vdsm-reg restart" on the hypervisor. I expected it to say "Pending Approval" again but it didn't.
5. I looked at /etc/vdsm-reg/vdsm-reg.conf and the vdc_hostname was blank and the vdc_host_port was incorrect.

#The hostname of the vdc, should be verified each boot (look for DNS SRV record)
vdc_host_name=None
#The port of the RHEV Manager. Allows http or https connections.
vdc_host_port=8443
Comment 7 Douglas Schilling Landgraf 2012-08-03 19:16:41 EDT
Hi Marina,

> Steps to Reproduce:
> 1. login to rhev-h admin tui with admin user
> 2. navigate to RHEV-M screen and update rhev-m info - hostname and ip (or just > one of them)
> 3. navigate to <Apply> and click enter
>   
> Actual results:
> Message "Failed downloading RHEV-M certificate" -> "RHEV-M configuration
> failed."
> Checking /etc/vdsm-reg/vdsm-reg.conf
> vdc_host_port and vdc_host_name fields are not updated.

Following your report, looks like your rhev-m was not reachable, let me explain why:

First message:

> Message "Failed downloading RHEV-M certificate"

From this message, looks like "download and verify RHEV-M certificate" is  checked.

From code:
============
vdsm_reg/engine.py.in

if self.verify_rhevm_cert.selected():
   if deployUtil.getRhevmCert(self.rhevm_server.value(),      
                              self.rhevm_server_port.value())
      <snip>

   else:
      ButtonChoiceWindow(self.ncs.screen, "@ENGINENAME@ Configuration", "Failed downloading @ENGINENAME@ certificate", buttons = ['Ok'])

So, engine couldn't download the certificate by deployUtil.getRhevmCert() and showed "Failed downloading RHEV-M certificate". After that, the code will flow to write_vdsm_config():
 
<snip>
if write_vdsm_config(self.rhevm_server.value(), self.rhevm_server_port.value()):
   <snip>

Inside write_vdsm_config:
=============================
before write the configuration (/etc/vdsm-reg/vdsm-reg.conf) it does:

  if system("ping -c 1 "   rhevm_host):
      (write the config)

  else:
      <snip>
      return False       

So, we couldn't ping the rhevm and returned False.. and if write_vdsm_config failed it will throw:

   ButtonChoiceWindow(self.ncs.screen, "@ENGINENAME@ Configuration", "@ENGINENAME@ Configuration Failed", buttons = ['Ok'])

or simple:
"RHEV-M configuration failed."

IMO, the rhevm was not reachable  and that's caused vdsm-reg/vdsm-reg.conf not be updated.

I am closing this bug as NOTABUG but fell free to reopen it in case you think it's a real bug.

BTW, these days upstream have a better approach, we try to connect to RHEV-M/Engine using httplib instead of ping command (it might cause registration fail in case ping port is a blocked in rhev-m).

Thanks
Douglas
Comment 8 Douglas Schilling Landgraf 2012-08-03 19:27:45 EDT
Hi Bryan,

> I encountered something similar on this same host actually:
> 
> 1. I put the system into maintenance mode and rebooted it
> 2. When it booted back up and I clicked Activate, it went Non-responsive
> 3. I logged into the admin console and the NIC device was set to Disabled even > though it had the correct IP address
>
> │   IPv4 ettings                                           │ 
> │   [*] Disabled [ ] DHCP [ ] Static                       │ 
> │   IP Address: 10.12.52.76_____ Netmask: 255.255.252.0___ │ 
> │   Gateway:    10.12.55.254____    

This happens because the interface is already configured. However, you might want to open a BZ requesting a different approach.

> 4. So then I tried removing it from RHEV-M and running "service vdsm-reg 
> restart" on the hypervisor. I expected it to say "Pending Approval" again but
> it didn't.
> 5. I looked at /etc/vdsm-reg/vdsm-reg.conf and the vdc_hostname was blank and
> the vdc_host_port was incorrect.

humm, I cannot see what happened here, is it easy to reproduce? Do you have somehow the steps? If you have it, please open a separate bugzilla for it.

Thanks!
Douglas
Comment 9 Marina 2012-08-22 19:52:59 EDT
Douglas, 
Thank you for the explanation.
Makes sense.

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