[SRU] Missing binary and dependency in 'cman' binary package

Bug #956383 reported by Rasmus Skaarup
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
redhat-cluster (Ubuntu)
Fix Released
Undecided
Ante Karamatić
Precise
Fix Released
Undecided
Unassigned
Quantal
Fix Released
Undecided
Ante Karamatić

Bug Description

[Impact]
This bug impacts all cman installations in 12.04. Being unable to update cluster.rng means that one can not verify if cluster.conf is valid.

[Development Fix]
No development version yet.

[Stable Fix]
Patch is a simple patch, affecting only debian/* files. Bug consists of three packaging bugs. Fix makes sure '/var/lib/cluster' is created during installation, it also makes sure 'ccs_update_schema' binary gets installed and adds new dep to cman binary - xsltproc. It's required to properly generate cluster.rng.

[Test Case]
1. Install 12.04 and then install cman package
2. Create file '/tmp/cluster.conf' containing:

<?xml version="1.0"?>
<cluster config_version="1" name="test">
<clusternodes/>
</cluster>

3. Run 'sudo ccs_config_validate -f /tmp/cluster.conf'
4. Expected result:
Configuration validates
(exit code 0)

[Regression Potential]
Regression potential is non-existing since current state of package is unusable.

Original report:

After installing cman and using ccs_tool to create a basic (but valid) /etc/cluster/cluster.conf, I am unable to run ccs_config_validate:

# ccs_config_validate
Unable to update relaxng schema: /usr/sbin/ccs_config_validate: line 191: ccs_update_schema: command not found
#

I think I have narrowed it down to a missing cluster.rng file:

# ls -al /usr/share/cluster/cluster.rng
lrwxrwxrwx 1 root root 28 Jan 13 17:07 /usr/share/cluster/cluster.rng -> /var/lib/cluster/cluster.rng
# ls -al /var/lib/cluster/cluster.rng
ls: cannot access /var/lib/cluster/cluster.rng: No such file or directory
#

Description: Ubuntu precise (development branch)
Release: 12.04

cman:
  Installed: 3.1.7-0ubuntu2
  Candidate: 3.1.7-0ubuntu2
  Version table:
 *** 3.1.7-0ubuntu2 0
        500 http://dk.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: cman 3.1.7-0ubuntu2
ProcVersionSignature: Ubuntu 3.2.0-17.27-generic 3.2.6
Uname: Linux 3.2.0-17-generic x86_64
ApportVersion: 1.94.1-0ubuntu2
Architecture: amd64
Date: Thu Mar 15 20:55:35 2012
InstallationMedia: Ubuntu-Server 12.04 LTS "Precise Pangolin" - Beta amd64 (20120229)
ProcEnviron:
 SHELL=/bin/bash
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 LANGUAGE=en_US:en
SourcePackage: redhat-cluster
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Rasmus Skaarup (78luphr0rnk2nuqimstywepozxn9kl19tqh0tx66b5dki1xxsh5mkz9gl21a5rlwfnr8jn6ln0m3jxne2k9x1o-launchpad) wrote :
Revision history for this message
ITec (itec) wrote :

Yes, I can confirm that problem.

"cman_tool version -r" calls "ccs_config_validate" and exits with the same error.

--> So I cannot promote changes in "cluster.conf".

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in redhat-cluster (Ubuntu):
status: New → Confirmed
Revision history for this message
ITec (itec) wrote :

No one affected any more?
No solution yet? ???

Can anyone provide the missing /var/lib/cluster/cluster.rng ?

Revision history for this message
Fabio Massimo Di Nitto (fabbione) wrote :

# ccs_config_validate
Unable to update relaxng schema: /usr/sbin/ccs_config_validate: line 191: ccs_update_schema: command not found

this is the problem.

ccs_update_schema is missing from the packages.

The relax ng schema in /var/lib/cluster is generated by ccs_update_schema.

Revision history for this message
ITec (itec) wrote :

Where can I get: ccs_update_schema?
Is it going to be included into the packages?

Revision history for this message
Fabio Massimo Di Nitto (fabbione) wrote :

I have no idea, i only wrote the tool upstream.

Ante Karamatić (ivoks)
Changed in redhat-cluster (Ubuntu):
assignee: nobody → Ante Karamatić (ivoks)
Revision history for this message
Ante Karamatić (ivoks) wrote :

Fabio thank you for your help!

ITec, could you please add ppa:ivoks/ha and test the fix:

sudo apt-add-repository ppa:ivoks/ha
sudo apt-get update
sudo apt-get install cman

Let me know if that solves this problem. Thanks!

Revision history for this message
ITec (itec) wrote :

Hi Ante,

thanks for the fix attempt.

After installing your cman I get this:

# ccs_config_validate
Unable to update relaxng schema: /usr/sbin/ccs_update_schema: line 377: /var/lib/cluster/rng_update.lock: No such file or directory

Seems like /var/lib/cluster is missing.

# mkdir /var/lib/cluster
# ccs_config_validate
/usr/share/cluster/cluster.rng:1008: element ref: Relax-NG parser error : Reference SERVICE has no matching definition
/usr/share/cluster/cluster.rng:1011: element ref: Relax-NG parser error : Reference VM has no matching definition
/usr/share/cluster/cluster.rng:1008: element ref: Relax-NG parser error : Internal found no define for ref SERVICE
/usr/share/cluster/cluster.rng:1011: element ref: Relax-NG parser error : Internal found no define for ref VM
Relax-NG schema /usr/share/cluster/cluster.rng failed to compile

But something else is wrong. :-(

Revision history for this message
Ante Karamatić (ivoks) wrote :

I've uploaded the package (to the same PPA) that solves the /var/lib/cluster issue. As for parsing errors, I'll have to dig into this. I can't think of a solution at this moment.

Revision history for this message
Fabio Massimo Di Nitto (fabbione) wrote :

You are still not shipping all the files required to make that tool to work.

cluster/config/tools/xml/cluster.rng.in.* are installed in rngdir=/usr/share/cluster/relaxng

Are you shipping those?

The tool is a simple bash script. Just take a look on why it's failing on your system. It doesn't require rocket science knowledge.

Revision history for this message
Fabio Massimo Di Nitto (fabbione) wrote :

ITtec: can you please run ccs_update_schema -v -f and collect the output from the run?

Revision history for this message
ITec (itec) wrote :
Download full text (3.5 KiB)

# ccs_update_schema -v -f
Generating resource-agents cache
 ras: checking required files
 ras: looking for agents
 ras: generating hashes
 ras: generating rng data
 ras: generating rng data
 ras: processing service.sh
 ras: processing ASEHAagent.sh
 ras: processing SAPDatabase
 ras: processing SAPInstance
 ras: processing apache.sh
 ras: processing checkquorum
 ras: processing clusterfs.sh
 ras: processing drbd.sh
 ras: processing fence_scsi_check.pl
 ras: processing fs.sh
 ras: processing ip.sh
 ras: processing lvm.sh
 ras: processing lvm_by_lv.sh
 ras: processing lvm_by_vg.sh
 ras: processing mysql.sh
 ras: processing named.sh
 ras: processing netfs.sh
 ras: processing nfsclient.sh
 ras: processing nfsexport.sh
 ras: processing nfsserver.sh
 ras: processing ocf-shellfuncs
 ras: processing openldap.sh
 ras: processing oracledb.sh
 ras: processing orainstance.sh
 ras: processing oralistener.sh
 ras: processing postgres-8.sh
 ras: processing samba.sh
 ras: processing script.sh
 ras: processing smb.sh
 ras: processing svclib_nfslock
 ras: processing tomcat-5.sh
 ras: processing tomcat-6.sh
 ras: processing vm.sh
 ras: generating ref data
 ras: processing service.sh
 ras: processing ASEHAagent.sh
 ras: processing SAPDatabase
 ras: processing SAPInstance
 ras: processing apache.sh
 ras: processing checkquorum
 ras: processing clusterfs.sh
 ras: processing drbd.sh
 ras: processing fence_scsi_check.pl
 ras: processing fs.sh
 ras: processing ip.sh
 ras: processing lvm.sh
 ras: processing lvm_by_lv.sh
 ras: processing lvm_by_vg.sh
 ras: processing mysql.sh
 ras: processing named.sh
 ras: processing netfs.sh
 ras: processing nfsclient.sh
 ras: processing nfsexport.sh
 ras: processing nfsserver.sh
 ras: processing ocf-shellfuncs
 ras: processing openldap.sh
 ras: processing oracledb.sh
 ras: processing orainstance.sh
 ras: processing oralistener.sh
 ras: processing postgres-8.sh
 ras: processing samba.sh
 ras: processing script.sh
 ras: processing smb.sh
 ras: processing svclib_nfslock
 ras: processing tomcat-5.sh
 ras: processing tomcat-6.sh
 ras: processing vm.sh
Generating fence-agents cache
 fas: checking required files
 fas: looking for agents
 fas: generating hashes
 fas: generating new cache
 fas: processing fence_ack_manual
 fas: processing fence_alom
 fas: processing fence_apc
 fas: processing fence_apc_snmp
 fas: processing fence_baytech
 fas: processing fence_bladecenter
 fas: processing fence_brocade
 fas: processing fence_bullpap
 fas: processing fence_cdu
 fas: processing fence_cisco_mds
 fas: processing fence_cisco_ucs
 fas: processing fence_cpint
 fas: processing fence_drac
 fas: processing fence_drac5
 fas: processing fence_eaton_snmp
 fas: processing fence_egenera
 fas: processing fence_eps
 fas: processing fence_ibmblade
 fas: processing fence_ifmib
 fas: processing fence_ilo
 fas: processing fence_ilo_mp
 fas: processing fence_intelmodular
 fas: processing fence_ipmilan
 fas: processing fence_ldom
 fas: processing fence_lpar
 fas: processing fence_mcdata
 fas: processing fence_na
 fas: processing fence_rackswitch
 fas: processing fence_rhevm
 fas: processing fence_rsa
 fas: processing fence_rsb
 fas: processing fence_sanbox2
 fas: p...

Read more...

Revision history for this message
K Lor (lorentz-y) wrote :

Hi
I had/have similar problems

I have two nics:
eth0 direct connection without a switch between the two nodes (10.0.0.x) , hostnames: node1-direct, node2-direct
eth1 with a switch 192.168.x.x (hostnames: node1, node2)

using the node[12]-direct hostname in a simple cluster.conf a ran in the same problem like ITec.

replacing the hostnames (-> node[12]) it works. adding altname
to the corresponding clusternode it works:
<altname name="node1-direct" port="5406" mcast="239.192.122.46" />

running: corosync-cfgtool -s # it show the two rings
Printing ring status.
Local node ID 2
RING ID 0
 id = 192.168.25.52
 status = ring 0 active with no faults
RING ID 1
 id = 10.0.0.52
 status = ring 1 active with no faults

maybe the helps..

KLor

Revision history for this message
Ante Karamatić (ivoks) wrote :

ITec make sure you update to most recent redhat-cluster-suite (apt-get update; apt-get dist-upgrade). Then run 'sudo ccs_config_validate'. If that still reports errors, please tar files from /var/lib/cluster and add it here. Then delete everything in /var/lib/cluster (sudo rm -rf /var/lib/cluster/*) and re-run 'sudo ccs_config_validate'.

Thanks!

Revision history for this message
ITec (itec) wrote :

Here the contents of /var/lib/cluster.
"sudo rm -rf /var/lib/cluster" did not help.

Revision history for this message
ITec (itec) wrote :

Actually I did:
# rm -rf /var/lib/cluster/*
# ccs_config_validate
/usr/share/cluster/cluster.rng:1008: element ref: Relax-NG parser error : Reference SERVICE has no matching definition
/usr/share/cluster/cluster.rng:1011: element ref: Relax-NG parser error : Reference VM has no matching definition
/usr/share/cluster/cluster.rng:1008: element ref: Relax-NG parser error : Internal found no define for ref SERVICE
/usr/share/cluster/cluster.rng:1011: element ref: Relax-NG parser error : Internal found no define for ref VM
Relax-NG schema /usr/share/cluster/cluster.rng failed to compile

Revision history for this message
Ante Karamatić (ivoks) wrote :

Hm... your cluster.rng, fence_agents.rng.cache and resources.rng.cache are incomplete. What's the output of:

dpkg -l | egrep resource-agents\|fence-agents\|cluster-agents\|libcman3

Revision history for this message
ITec (itec) wrote :

# dpkg -l | egrep resource-agents\|fence-agents\|cluster-agents\|libcman3
ii fence-agents 3.1.5-2ubuntu2 Fence Agents for Red Hat Cluster
ii libcman3 3.1.7-0ubuntu3~ppa2 Red Hat cluster suite - cluster manager libraries
ii resource-agents 1:3.9.2-5ubuntu4 Cluster Resource Agents

Revision history for this message
ITec (itec) wrote :

Hi!

What can I do to complete my fence_agents.rng.cache and resources.rng.cache?

Best regrards
Christian

Revision history for this message
ITec (itec) wrote :

Does not anybody know where to get the missing files?

This is really a serious problem:
It means RHCS does not work on precise!!!!

Revision history for this message
Andres Rodriguez (andreserl) wrote :

I have tested the above packages from PPA with a simple sample cluster.conf and haven't experienced the issues you are describing. Please provide a sample cluster.conf to reproduce.

Thank you.

Revision history for this message
ITec (itec) wrote :

Hi Andres,

thanks for your response.

You did not experience any problem?
Which packages did you install from "ppa:ivoks/ha"?
I did: cman_3.1.7-0ubuntu3~ppa2

Do I have to install any other packages from "ppa:ivoks/ha"?

Here is my cluster.conf.

Best regards
Christian

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi Christian,

The problem has been identified. Ante will be rolling an update to the PPA for testing and if successful, it will hit the precise archives soon.

Thank you!

Ante Karamatić (ivoks)
Changed in redhat-cluster (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Ante Karamatić (ivoks) wrote :

I've just uploaded version 3.1.7-0ubuntu3~ppa3. It will get built in few minutes. Please test it and report results. Note that you will have to manually flush the cache first:

ccs_update_schema -f

Thanks for reporting! Please, test the fix ASAP so we can push the fix ASAP (too) :)

Revision history for this message
ITec (itec) wrote :

Error messages are getting fewer! ;-)

# ccs_update_schema -f
# ccs_config_validate
tempfile:2: element cluster: Relax-NG validity error : Invalid attribute alias for element cluster
Configuration fails to validate

Revision history for this message
Ante Karamatić (ivoks) wrote :

And if you remove alias from your cluster.conf?

Revision history for this message
Ante Karamatić (ivoks) wrote :

There are three unrelated issues in packaging:

1. /var/lib/cluster isn't created during installation
2. /usr/sbin/ccs_update_schema binary isn't installed during installation
3. once installed, ccs_update_schema might fail since there's no guarantee that 'xsltproc' is available on the system

Ante Karamatić (ivoks)
description: updated
summary: - ccs_config_validate exits with 191 and broken link for cluster.rng
+ [SRU] Missing binary and dependency in 'cman' binary package
Changed in redhat-cluster (Ubuntu):
status: In Progress → Confirmed
Revision history for this message
ITec (itec) wrote :

# diff cluster.conf_007 cluster.conf
3c3
< <cluster alias="tuxtest" config_version="7" name="tuxtest">
---
> <cluster config_version="8" name="tuxtest">

# ccs_config_validate
Configuration validates

Yippie!!! :-D

Is "alias" not supported any more or is this still a bug to be solved?

********************

But here is the next problem:

# cman_tool version -r
sh: 1: /usr/bin/ccs_sync: not found
cman_tool: ccs_sync failed.
If you have distributed the config file yourself, try re-running with -S

Is "ccs_sync" still missing in the package?

Revision history for this message
ITec (itec) wrote :

# scp /etc/cluster/cluster.conf tuxtest2:/etc/cluster/
cluster.conf 100% 1526 1.5KB/s 00:00
# cman_tool version -r -S
# cman_tool version
6.2.0 config 8

This works fine! :-)

Revision history for this message
Ante Karamatić (ivoks) wrote :

I don't see 'alias' being supported by cluster.rng in upstream source, so I would say, no, it's not supported.

ccs_sync is not available in Ubuntu; it's part of conga/ricci software. Take a look at http://git.fedorahosted.org/git/?p=conga.git.

Revision history for this message
ITec (itec) wrote :

Hi Ante,

thanks a lot for your bugfix!

I do not need 'alias' at all. So that's OK!

'cman_tool version -r' just produces not a very nice error message.
Maybe you just write a little ccs_sync that outputs a nice error message and exits with error code?

That's my tiny solution for ccs_sync:

  #!/bin/bash

  CLUSTERCONF=/etc/cluster/cluster.conf

  nodes="$( cman_tool nodes | tail -n +2 | awk '{print $6}' )"
  localnode="$( cman_tool status | grep '^Node name: ' | awk '{print $3}' )"
  othernodes="$( echo ' '$nodes' ' | sed 's/ '$localnode' / /g' )"

  for node in $othernodes; do
   scp $CLUSTERCONF $node:$CLUSTERCONF
  done

Best regards
Christian

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Rasmus, or anyone else affected,

Accepted redhat-cluster into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in redhat-cluster (Ubuntu Precise):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
ITec (itec) wrote :

Hi Martin,

I could verify your fix.

I downgraded all my packages manually to "Ubuntu:12.04/precise".
Then I added "Ubuntu:12.04/precise-proposed" to /etc/apt/sources.list.

# apt-get update
# apt-get install redhat-cluster-suite

# dpkg -l redhat-cluster-suite rgmanager cman
ii cman 3.1.7-0ubuntu2.1
ii redhat-cluster-suite 3.1.7-0ubuntu2.1
ii rgmanager 3.1.7-0ubuntu2.1

# ccs_update_schema -f
# ccs_config_validate
Configuration validates

Success!

Best regards
Christian

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package redhat-cluster - 3.1.7-0ubuntu2.1

---------------
redhat-cluster (3.1.7-0ubuntu2.1) precise-proposed; urgency=low

  * debian/control:
    - add xsltproc to cman's deps
  * debian/cman.install:
    - install ccs_update_schema and it's man page
  * debian/cman.dirs:
    - create /var/lib/cluster
  * (LP: #956383)
 -- Ante Karamatic <email address hidden> Tue, 26 Apr 2012 08:16:59 +0200

Changed in redhat-cluster (Ubuntu Quantal):
status: Confirmed → Fix Released
Changed in redhat-cluster (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.