Hide Forgot
Description of problem: mkdumprd fails if clustername is greater than 40 character Version-Release number of selected component (if applicable): kexec-tools-2.0.0-300.el6.x86_64 How reproducible: Always Steps to Reproduce: 1. In a pacemaker cluster node add cluster FQDN longer than 40 charecters in /etc/cluster/cluster.conf 2. touch /etc/kdump.conf 3. service restart kdump Actual results: # service kdump restart Stopping kdump: [ OK ] No kdump initial ramdisk found. [WARNING] Rebuilding /boot/initrd-2.6.32-504.el6.x86_64kdump.img The ifcfg-is or ifcfg-xxx which contains DEVICE=is field doesn't exist. Failed to run mkdumprd Expected results: It should work without issue Additional info: The reason mkdumrd is failing is below lines : ~~~ 1607 # Returns list of nodes defined in Pacemaker cluster. 1608 get_pcs_cluster_nodes() 1609 { 1610 echo "xpath /cluster/clusternodes/clusternode/@name" \ 1611 | xmllint --shell $CLUSTER_CONFIG_FILE | grep content | cut -d'=' -f2 1612 } ~~~ The above lines only returns upto 40 char and then adds trailing dots. For example : ~~~ echo "xpath /cluster/clusternodes/clusternode/@name" | xmllint --shell /etc/cluster/cluster.conf| grep content | cut -d'=' -f2 clust6-ha-pcs-node1.gsslab.pnq.redhat.co... clust6-ha-pcs-node2.gsslab.pnq.redhat.co... ~~~ As per my discussion with maintainer of libxml2 for 'xmllint --shell' this is expected as "it's intended for human consumption and there is no reason to display a 2000 caracter string value" One can use --xpath : ~~~ xmllint --xpath '/cluster/clusternodes/clusternode/@name' cluster.conf name="clust6-ha-pcs-node1.gsslab.pnq.redhat.com" name="clust6-ha-pcs-node2.gsslab.pnq.redhat.com" ~~~ Unfortunately --xpath is not available even for latest libxml2 available in RHEL 6.x
Created attachment 1221032 [details] Propose patch
Hi Shatadru Bandyopadhyay, I am trying to reproduce the bug, but fail to setup the env. I have "yum -y install pcs pacemaker fence-agents-all resource-agents", and see the /etc/cluster/cluster.conf. But I can not get the dir "/cluster/clusternodes/clusternode/". Could you give me some detail about the env. Thank you very much Pingfan (In reply to Shatadru Bandyopadhyay from comment #0) > Description of problem: > mkdumprd fails if clustername is greater than 40 character > > > Version-Release number of selected component (if applicable): > kexec-tools-2.0.0-300.el6.x86_64 > > How reproducible: > Always > > Steps to Reproduce: > 1. In a pacemaker cluster node add cluster FQDN longer than 40 charecters in > /etc/cluster/cluster.conf > > 2. touch /etc/kdump.conf > > 3. service restart kdump > > > Actual results: > # service kdump restart > Stopping kdump: [ OK ] > No kdump initial ramdisk found. [WARNING] > Rebuilding /boot/initrd-2.6.32-504.el6.x86_64kdump.img > The ifcfg-is or ifcfg-xxx which contains DEVICE=is field doesn't exist. > Failed to run mkdumprd > > > Expected results: > It should work without issue > > Additional info: > > The reason mkdumrd is failing is below lines : > ~~~ > 1607 # Returns list of nodes defined in Pacemaker cluster. > 1608 get_pcs_cluster_nodes() > 1609 { > 1610 echo "xpath /cluster/clusternodes/clusternode/@name" \ > 1611 | xmllint --shell $CLUSTER_CONFIG_FILE | grep content | cut > -d'=' -f2 > 1612 } > ~~~ > > The above lines only returns upto 40 char and then adds trailing dots. > > For example : > ~~~ > echo "xpath /cluster/clusternodes/clusternode/@name" | xmllint --shell > /etc/cluster/cluster.conf| grep content | cut -d'=' -f2 > clust6-ha-pcs-node1.gsslab.pnq.redhat.co... > clust6-ha-pcs-node2.gsslab.pnq.redhat.co... > ~~~ > As per my discussion with maintainer of libxml2 for 'xmllint --shell' this > is expected as "it's intended for human consumption and there is no reason > to display a 2000 caracter string value" > > One can use --xpath : > ~~~ > xmllint --xpath '/cluster/clusternodes/clusternode/@name' cluster.conf > name="clust6-ha-pcs-node1.gsslab.pnq.redhat.com" > name="clust6-ha-pcs-node2.gsslab.pnq.redhat.com" > ~~~ > > Unfortunately --xpath is not available even for latest libxml2 available in > RHEL 6.x
(In reply to Pingfan Liu from comment #3) > Hi Shatadru Bandyopadhyay, > > I am trying to reproduce the bug, but fail to setup the env. > I have "yum -y install pcs pacemaker fence-agents-all resource-agents", > and see the /etc/cluster/cluster.conf. But I can not get the dir > "/cluster/clusternodes/clusternode/". > Could you give me some detail about the env. > Make a mistake. I had thought it was something like mountpoint in DFS. I can work with the env. Please ignore the last comments. Thx, > Thank you very much > Pingfan > > (In reply to Shatadru Bandyopadhyay from comment #0) > > Description of problem: > > mkdumprd fails if clustername is greater than 40 character > > > > > > Version-Release number of selected component (if applicable): > > kexec-tools-2.0.0-300.el6.x86_64 > > > > How reproducible: > > Always > > > > Steps to Reproduce: > > 1. In a pacemaker cluster node add cluster FQDN longer than 40 charecters in > > /etc/cluster/cluster.conf > > > > 2. touch /etc/kdump.conf > > > > 3. service restart kdump > > > > > > Actual results: > > # service kdump restart > > Stopping kdump: [ OK ] > > No kdump initial ramdisk found. [WARNING] > > Rebuilding /boot/initrd-2.6.32-504.el6.x86_64kdump.img > > The ifcfg-is or ifcfg-xxx which contains DEVICE=is field doesn't exist. > > Failed to run mkdumprd > > > > > > Expected results: > > It should work without issue > > > > Additional info: > > > > The reason mkdumrd is failing is below lines : > > ~~~ > > 1607 # Returns list of nodes defined in Pacemaker cluster. > > 1608 get_pcs_cluster_nodes() > > 1609 { > > 1610 echo "xpath /cluster/clusternodes/clusternode/@name" \ > > 1611 | xmllint --shell $CLUSTER_CONFIG_FILE | grep content | cut > > -d'=' -f2 > > 1612 } > > ~~~ > > > > The above lines only returns upto 40 char and then adds trailing dots. > > > > For example : > > ~~~ > > echo "xpath /cluster/clusternodes/clusternode/@name" | xmllint --shell > > /etc/cluster/cluster.conf| grep content | cut -d'=' -f2 > > clust6-ha-pcs-node1.gsslab.pnq.redhat.co... > > clust6-ha-pcs-node2.gsslab.pnq.redhat.co... > > ~~~ > > As per my discussion with maintainer of libxml2 for 'xmllint --shell' this > > is expected as "it's intended for human consumption and there is no reason > > to display a 2000 caracter string value" > > > > One can use --xpath : > > ~~~ > > xmllint --xpath '/cluster/clusternodes/clusternode/@name' cluster.conf > > name="clust6-ha-pcs-node1.gsslab.pnq.redhat.com" > > name="clust6-ha-pcs-node2.gsslab.pnq.redhat.com" > > ~~~ > > > > Unfortunately --xpath is not available even for latest libxml2 available in > > RHEL 6.x
Hello Qiao, I think you are kexec-tools-2.0.0-280.el6.x86_64. Update the kexec-tools to '2.0.0-300.el6.x86_64' Then, # touch /etc/kdump.conf and restart the kdump service and that should reproduce the issue. --Shatadru
(In reply to Shatadru Bandyopadhyay from comment #8) > Hello Qiao, > > I think you are kexec-tools-2.0.0-280.el6.x86_64. > > Update the kexec-tools to '2.0.0-300.el6.x86_64' > > Then, > > # touch /etc/kdump.conf > > and restart the kdump service and that should reproduce the issue. > > --Shatadru Oh, yes, i will try to test -300 package. Thanks!
Reasigning to libxml2 instead considering the patch review issues, it will be better to be resolved in xmllint tool.
After browsing the libxml2 code, I think there is a easy fix to avoid the backport. diff --git a/debugXML.c b/debugXML.c index a1b550a..75ff912 100644 --- a/debugXML.c +++ b/debugXML.c @@ -431,7 +431,7 @@ xmlCtxtDumpString(xmlDebugCtxtPtr ctxt, const xmlChar * str) fprintf(ctxt->output, "(NULL)"); return; } - for (i = 0; i < 40; i++) + for (i = 0; i < 128; i++) if (str[i] == 0) return; else if (IS_BLANK_CH(str[i])) Since the longest hostname should be less than 64 chars. So 128 is big enough. Regards, Pingfan
Red Hat Enterprise Linux 6 transitioned to the Production 3 Phase on May 10, 2017. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available. The official life cycle policy can be reviewed here: http://redhat.com/rhel/lifecycle This issue does not appear to meet the inclusion criteria for the Production Phase 3 and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL: https://access.redhat.com