Red Hat Bugzilla – Bug 962737
The file /etc/idmapd.conf will be incorrect if you configured NFSv4 Domain with the same words in /etc/idmapd.conf.
Last modified: 2014-01-21 14:34:08 EST
Description of problem: The configuration file /etc/idmapd.conf will be incorrect if you configured NFSv4 Domain with the same words in /etc/idmapd.conf. Version-Release number of selected component (if applicable): rhev-hypervisor-advanced-6.4-20130513.0.el6ev ovirt-node-2.5.0-17.el6_4.4.noarch How reproducible: 100% Steps to Reproduce: 1. Clear install RHEV-H. 2. On the Remote Storage page, configure NFSv4 Domain with the same words in /etc/idmapd.conf. eg: nobody 3. On the Remote Storage page, configure NFSv4 Domain with another name. 4. Check in the /etc/idmapd.conf file. Actual results: After step4, it changes all the name which is matched with NFSv4 Domain name which is setted up before in /etc/idmapd.conf. This problem is caused by the following code. 574 def set_nfsv4_domain(domain): 575 idmap_conf = "/etc/idmapd.conf" 576 current_domain = get_current_nfsv4_domain() 577 unmount_config(idmap_conf) 578 if current_domain.startswith("#"): 579 current_domain = "#Domain = %s" % current_domain.replace("# ","" ) 580 system("sed -i 's/%s/Domain = %s/g' %s" \ 581 % (current_domain, domain, idmap_conf)) 582 else: 583 system("sed -i 's/%s/%s/g' %s" \ 584 % (current_domain, domain, idmap_conf)) 585 if ovirt_store_config(idmap_conf): 586 logger.info("NFSv4 domain set as: " + domain) 587 else: 588 logger.warning("Setting nfsv4 domain failed") 589 system_closefds("service rpcidmapd restart") 590 system_closefds("nfsidmap -c &>/dev/null") From the line 583-584, we can see it will replace all the words which are matched with the input domain. And that's we do wanted since we only want to change the domain name. Expected results: After step4, it only changes the name of the domain field in /etc/idmapd.conf. Additional info:
Patch: http://gerrit.ovirt.org/14751 This makes sure that it only edits lines that start with "Domain"
Because the bug#980451 in rhev-hypervisor6.5 blocks the test of this bug. So I will wait to check this bug once the bug#980451 is fixed. Thanks.
Test version: rhevh-6.5-20131024.1.0.iso ovirt-node-3.0.1-6.el6.noarch Test steps: 1. Clear install rhevh-6.5-20131024.1.0.iso. 2. Configure NFSv4 domain name with nobody. 3. On the Remote Storage page, configure NFSv4 Domain with another name. 4. Check in the /etc/idmapd.conf file. Test result: 1. After step4, it only changes the Domain field in /etc/idmapd.conf file. This bug is fixed in rhevh-6.5-20131024.1.0.iso. So change the status from ON_QA to VERIFIED.
This bug is currently attached to errata RHBA-2013:15277. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag. Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information: * Cause: What actions or circumstances cause this bug to present. * Consequence: What happens when the bug presents. * Fix: What was done to fix the bug. * Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore') Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug. For further details on the Cause, Consequence, Fix, Result format please refer to: https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes Thanks in advance.
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-2014-0033.html