Operating System - HP-UX
1833870 Members
1611 Online
110063 Solutions
New Discussion

Problems to upload package

 
Carles Viaplana
Valued Contributor

Problems to upload package

Hello,

When I try to start a package on a cluster with 2 nodes HP-UX 11.11 I get this error from log:

/etc/cmcluster/labgen/labgen.sh[180]: -g: not found.

I investigated a little bit and seems to be an issue with CVM disk group activation parameter.

I activate volume group in non-exclusive mode (vgchange -a y) and CVM disk group in exclusivewrite mode (vxdg -g \$DiskGroup set activation=exclusivewrite).

Are these options compatible?

Thanks in advance,

Carles

PS: I attached script to load package
14 REPLIES 14
mirco_1
Valued Contributor

Re: Problems to upload package

hi,

what there is write in line 180 of

/etc/cmcluster/labgen/labgen.sh ?

DM.
Luk Vandenbussche
Honored Contributor

Re: Problems to upload package

Hi,

Our you working with LVM or VxVM (veritas volume Manager?)

Is also an activation of the LVM volumegroup?
RAC_1
Honored Contributor

Re: Problems to upload package

do you have a combination og LVM and VxVM??
One volume group you activate with vgchange while other with vxdg.
There is no substitute to HARDWORK
melvyn burnard
Honored Contributor

Re: Problems to upload package

This looks like a modification may have been made to the file, and it has resulted in a character being left out or inserted where it should not.

Examine the file closely.
For the record, why are you activating LVM groups in non-exclusive mode? This is not the correct method of activating shared VG's

I also note that you are using package scripts for Serviceguard 11.13 which is no longer supported, you should consider upgrading to a supported version of Serviceguard if you have not already done so.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Carles Viaplana
Valued Contributor

Re: Problems to upload package

Hello,

Thanks to all for your comments.

We use VxVM only and we activate LVM groups in non-exclusive mode as we can't activate them with usual command "vgchange -a e", even manually.

Should I modify something at cluster configuration level?

Thanks!

Carles
Stephen Doud
Honored Contributor

Re: Problems to upload package

The top of the script that you provided shows that the script was originally generated when the server was loaded with Serviceguard version A.11.13

The VGCHANGE parameters permissible are:

# VGCHANGE="vgchange -a e -q n"
# VGCHANGE="vgchange -a e -q n -s"
# VGCHANGE="vgchange -a e" # Default

Your script shows this:
VGCHANGE="vgchange -a y" <<-- NOT SUPPORTED
Serviceguard requires LVM VGs to be activated in "exclusive" mode to protect data.
'vgdisplay' reports the activation mode in the Status field. (If you don't see "exclusive", the VG activates in normal mode)

The script also shows that this VG is being activated:
VG[0]="/dev/vglabccs"

It also lists no VxVM disk groups or CVM shared disk groups:

#CVM_DG[0]=""
#VXVM_DG[0]=""

The default CVM_ACTIVATION_CMD line looks like:

CVM_ACTIVATION_CMD="vxdg -g \$DiskGroup set activation=exclusivewrite"

This is the same as the line in the script you provided, so it should be safe.

I suggest that you create a new template file: "cmmakepkg -s cntl" and diff it with your script, to see if any functions in the script were modified. They should not be (other than customer_defined_run_cmds and ..halt_cmds)
Carles Viaplana
Valued Contributor

Re: Problems to upload package

Hello,

Thanks for your message.

I generated new template file and there're no differences beetwen my script and generated template.

BTW, I checked cluster.conf file and all used volumes by running packages are defined there:

[...]
# List of cluster aware LVM Volume Groups. These volume groups will
# be used by package applications via the vgchange -a e command.
# Neither CVM or VxVM Disk Groups should be used here.
# For example:
# VOLUME_GROUP /dev/vgdatabase
# VOLUME_GROUP /dev/vg02

VOLUME_GROUP /dev/vgin1
VOLUME_GROUP /dev/vgin2
VOLUME_GROUP /dev/vgfa2
VOLUME_GROUP /dev/vgfa1
VOLUME_GROUP /dev/vgrman
VOLUME_GROUP /dev/vglab

Should I define volume used by my new package labgen? I case I do, how should I do the update?

Regards,

Carles
melvyn burnard
Honored Contributor

Re: Problems to upload package

Have you marked the VG's to be cluster aware?
vgchange -c y vg

You can test your control script by doing:
cd /etc/cmcluster/labgen
sh -n labgen.sh

As I mentioned earlier, SG 11.13 is out of suport, and you should look at updating to a supported version.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Stephen Doud
Honored Contributor

Re: Problems to upload package

Line 180 of your script contains this:
# VXVOL="vxvol -g \$DiskGroup -o bg startall" and comment out the default.

It is commented out, so I'm surprised the script rejects it.

As Melvyn stated, use 'sh -n <script name>' to test the script syntax.

I ran it on your script and got this:
$ sh -n suscript
suscript[475]: Syntax error at line 476 : `fi' is not expected.


I created a fresh 11.16 script and ran the command:
# sh -n pkg.cntl
#

Try sh -n on an untouched script. It should pass syntax checks. If not, shell parsing may be modified.... LANG parameter set?
Carles Viaplana
Valued Contributor

Re: Problems to upload package

Hi all,

Sorry for replay in my reply, but we had some problems in other environments and I wasn't able.

In fact, I executed sh -n script and I got this error:

# sh -n labgen.sh
labgen.sh[440]: VGS: The specified subscript cannot be greater than 1024.
#

I checked file permissions and all is ok:

# ll
total 160
-rw-r----- 1 root sys 12604 Nov 9 22:03 labgen.config
-rwx------ 1 root sys 50766 Nov 10 15:17 labgen.sh
-rw-rw-rw- 1 root root 1026 Nov 10 15:18 labgen.sh.log
#

Thanks in advance for your help!
Regards,

Carles
Carles Viaplana
Valued Contributor

Re: Problems to upload package

Hello again,

I edited cluster.conf file adding volume I use on my new package:

[...]
# List of cluster aware LVM Volume Groups. These volume groups will
# be used by package applications via the vgchange -a e command.
# Neither CVM or VxVM Disk Groups should be used here.
# For example:
# VOLUME_GROUP /dev/vgdatabase
# VOLUME_GROUP /dev/vg02

VOLUME_GROUP /dev/vgin1
VOLUME_GROUP /dev/vgin2
VOLUME_GROUP /dev/vgfa2
VOLUME_GROUP /dev/vgfa1
VOLUME_GROUP /dev/vgrman
VOLUME_GROUP /dev/vglab
VOLUME_GROUP /dev/labcss

Does this change help to sove issue?
If I execute cmapplyconf, will it stop cluster?

Thanks in advance for your help.
Regards,

Carles
Stephen Doud
Honored Contributor

Re: Problems to upload package

There are 2 ways to add a VG to the cluster. Both require an entry in the cluster configuration file as the first step.
The second step is to either run cmapplyconf on the file, or use "vgchange -c y " to mark the cluster ID and activation mode on the VG.

The message that you reported earlier: "specified subscript cannot be greater than 1024" - is resolved by a cumulative patch to sh-posix:

11.10: PHCO_28831
11.11: PHCO_33375



Carles Viaplana
Valued Contributor

Re: Problems to upload package

Hello,

vg is already active and cluster config file already modified too.

Now I've some questions:

- Will cmapplyconf command stop cluster?
- Do you think this is the cause of reported error (/etc/cmcluster/labgen/labgen.sh[180]: -g: not found)?

Thanks in advance for your help.
Regards,

Carles
Stephen Doud
Honored Contributor

Re: Problems to upload package

You can add or remove a VG via the cluster configuration file and a cmapplyconf while the cluster is running.
This is not the cause of the error you are seeing in the package control script.
With the package down, try running the script manually and see what happens:
/etc/cmcluster//NOTE: this will give you trouble if SERVICE entries are defined - comment them out.

To reverse the startup, use the same command, except with a 'stop' option.