Bug 139132 - [maintainer-update] FreeBSDize sysutils/heartbeat startup script
[maintainer-update] FreeBSDize sysutils/heartbeat startup script
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: glarkin
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-25 14:40 UTC by ports
Modified: 2009-12-16 03:50 UTC (History)
0 users

See Also:


Attachments
file.diff (5.84 KB, patch)
2009-09-25 14:40 UTC, ports
no flags Details | Diff
heartbeat-139132-p2.diff.txt (1.03 KB, text/plain; charset=US-ASCII)
2009-11-10 14:05 UTC, ports
no flags Details
heartbeat-139132-p3.diff.txt (2.11 KB, text/plain; charset=US-ASCII)
2009-11-18 13:03 UTC, ports
no flags Details
heartbeat-139132-p4.diff.txt (12.43 KB, text/plain; charset=US-ASCII)
2009-12-13 21:38 UTC, ports
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description ports 2009-09-25 14:40:01 UTC
Removing the distributions rc.d script for a proper FreeBSD one.

Fix: Wrote a new one that is attached.

Patch contains changes:
- New file files/heartbeat.in
- Removed file files/patch-heartbeat-init.d-heartbeat.in
- Updated Makefile to copy it into place before build.

Patch attached with submission follows:
How-To-Repeat: N/A.
Comment 1 glarkin freebsd_committer 2009-10-09 06:12:58 UTC
Responsible Changed
From-To: freebsd-ports-bugs->glarkin

I'll take it.
Comment 2 glarkin freebsd_committer 2009-11-05 22:50:41 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Justin,

I am testing your patch on a FreeBSD 7 machine.  sysutils/heartbeat
installed without any problems, and I added the _enable line to
/etc/rc.conf.

When I try to start heartbeat, I get this error:

fbsd70# /usr/local/etc/rc.d/heartbeat start
cat: /usr/local/etc/ha.d/haresources: No such file or directory

Does that file need to be created by hand?  If so, can you send a sample
to me?

Thank you,
Greg
- --
Greg Larkin

http://www.FreeBSD.org/           - The Power To Serve
http://www.sourcehosting.net/     - Ready. Set. Code.
http://twitter.com/sourcehosting/ - Follow me, follow you
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFK81bB0sRouByUApARAoIJAJ0XDdV263bvuk1uxrJbQl6kTbQdaACgiTsq
d3DUZrawEmAtVPPtPGnVdrE=
=5uNQ
-----END PGP SIGNATURE-----
Comment 3 ports 2009-11-10 14:05:37 UTC
Hi Greg,

Not sure why you are getting that error message.  I did a clean
install here with the patch applied and did not see that.  Could you
execute the script like the below and email me the output?  I also
have a small patch to apply after this one that fixes a few other
things not related to this.

sh -x /usr/local/etc/rc.d/heartbeat start

---

root@build [/usr/ports/sysutils/heartbeat]
# /usr/local/etc/rc.d/heartbeat start

root@build [/usr/ports/sysutils/heartbeat]
# echo $?
0


root@build [/usr/ports/sysutils/heartbeat]
# ll /usr/local/etc/ha.d/haresources
ls: /usr/local/etc/ha.d/haresources: No such file or directory

root@build [/usr/ports/sysutils/heartbeat]
# ps uaxww | grep heart
hacluster  3521  0.1  0.1 31628  3900  ??  S     5:24AM   0:00.01
/usr/local/lib/heartbeat/attrd
root       3523  0.1  0.1 30544  3864  ??  S     5:24AM   0:00.01
/usr/local/lib/heartbeat/pingd -m 100 -d 5s
root       3494  0.0  0.3 41072 11556  ??  Ss    5:23AM   0:00.07
/usr/local/lib/heartbeat/heartbeat
root       3498  0.0  0.3 40048 10528  ??  S     5:23AM   0:00.03
/usr/local/lib/heartbeat/heartbeat
root       3499  0.0  0.3 40048 10528  ??  S     5:23AM   0:00.03
/usr/local/lib/heartbeat/heartbeat
root       3500  0.0  0.3 40048 10528  ??  I     5:23AM   0:00.03
/usr/local/lib/heartbeat/heartbeat
root       3501  0.0  0.3 40048 10528  ??  S     5:23AM   0:00.03
/usr/local/lib/heartbeat/heartbeat
root       3502  0.0  0.3 40048 10528  ??  S     5:23AM   0:00.03
/usr/local/lib/heartbeat/heartbeat
hacluster  3517  0.0  0.1 32476  4040  ??  S     5:24AM   0:00.01
/usr/local/lib/heartbeat/ccm
hacluster  3518  0.0  0.1 38416  5908  ??  S     5:24AM   0:00.00
/usr/local/lib/heartbeat/cib
root       3519  0.0  0.1 39908  4184  ??  S     5:24AM   0:00.01
/usr/local/lib/heartbeat/lrmd -r
root       3520  0.0  0.2 33620  9196  ??  S     5:24AM   0:00.01
/usr/local/lib/heartbeat/stonithd
hacluster  3522  0.0  0.1 37868  4628  ??  S     5:24AM   0:00.01
/usr/local/lib/heartbeat/crmd
root       3482  0.0  0.1 31492  3032   0  S     5:23AM   0:00.00
/usr/local/lib/heartbeat/ha_logd -d -c /usr/local/etc/ha.d/logd.cf
root       3491  0.0  0.1 31492  2888   0  S     5:23AM   0:00.00
/usr/local/lib/heartbeat/ha_logd -d -c /usr/local/etc/ha.d/logd.cf

- Justin
Comment 4 ports 2009-11-18 13:03:42 UTC
I'm going to throw in another patch to this maintainer update that
fixes the following issues.

1. It was reported that building with NOPORTDOCS enabled would fail.
This is now fixed.
2. I found out why the drac3 stonith plugin would sometimes magically
show up.  Turns out if it finds libcurl installed it will auto-build.
This is now properly handled in the port.

Updated files for this 3rd patch:

Makefile
pkg-plist

- Justin
Comment 5 ports 2009-11-18 13:50:07 UTC
Well, I am not sure what happened in this last post.  I never attached
the p2 patch again but it seems to think something called that got
attached.  Here is my comments for what was suppose to be in the last
post.

---

I'm going to throw in another patch to this maintainer update that
fixes the following issues.

1. It was reported that building with NOPORTDOCS enabled would fail.
This is now fixed.
2. I found out why the drac3 stonith plugin would sometimes magically
show up.  Turns out if it finds libcurl installed it will auto-build.
This is now properly handled in the port.

Updated files for this 3rd patch:

Makefile
pkg-plist

- Justin
Comment 6 glarkin freebsd_committer 2009-12-03 05:38:10 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Justin Head wrote:
> Hi Greg,
> 
> Not sure why you are getting that error message.  I did a clean
> install here with the patch applied and did not see that.  Could you
> execute the script like the below and email me the output?  I also
> have a small patch to apply after this one that fixes a few other
> things not related to this.
> 

Hi Justin,

Here is the pertinent output from the startup script.  Check the line
below where /usr/local/share/heartbeat/ResourceManager is invoked.  That
script expects /usr/local/etc/rc.d/ha.d/haresources to exist.  I got
around the problem by running "touch /usr/local/etc/ha.d/haresources",
but that's probably not correct.

What are the heartbeat-related entries in your /etc/rc.conf?  I'm
guessing that they are different than mine, since I only have:

heartbeat_enable="YES"

and the startup script will act differently with different settings.

[...]
+ heartbeat_runstartstop pre-start
+ [ -f /usr/local/etc/ha.d/resource.d/startstop ]
+ heartbeat_checkyesno crm
+ ha_parameter crm
+ tr [A-Z] [a-z]
+ sed -e s%[    ][      ]*% % -e s%^ %% -e s%#.*%% /usr/local/etc/ha.d/ha.cf
+ grep -i ^crm
+ sed s%[^ ]* %%
+ VALUE=
+ [ X = X ]
+ Echo
+ echo
+ false
+
+ /usr/local/share/heartbeat/ResourceManager verifyallidle
cat: /usr/local/etc/ha.d/haresources: No such file or directory
+ rm -f /var/run/ppp.d/*
+ [ ! -d /var/run/heartbeat ]
+ [ -f /usr/local/etc/ha.d/ipresources -a ! -f
/usr/local/etc/ha.d/haresources ]
+ /usr/local/lib/heartbeat/heartbeat
+ RC=6
+ [ 6 -eq 0 ]
+ heartbeat_runstartstop post-start 6
+ [ -f /usr/local/etc/ha.d/resource.d/startstop ]
+ return 6
+ _return=6
+ [ 6 -ne 0 ]
+ [ -z  ]
+ return 1
+ return 1

Thank you,
Greg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFLF07C0sRouByUApARAk99AJ9uEct8UJ/RF4+fadFbPKjbDVGi2gCfX5ZT
JLVUZlbQ85hPiE4GxVUikH4=
=5RZC
-----END PGP SIGNATURE-----
Comment 7 glarkin freebsd_committer 2009-12-09 01:18:06 UTC
State Changed
From-To: open->feedback

Waiting for response from submitter.
Comment 8 ports 2009-12-13 21:38:47 UTC
Alright, thanks to Greg I've managed to figure out and provide a
workaround for the startup script "cat" error.  In addition, i've
fixed a number of other small issues that have been reported.  I went
ahead and re-rolled the previous patches and the new items into a
complete diff that was ran against the latest port revision = 4.

So, the full change log for this update is as follows:

Changes:
- Proper FreeBSD startup script is now available.
- Building with NOPORTDOCS succeeds.
- Added drac3 and apcmastersnmp stonith plugin install options.
- Workaround for vacm, bladehpi, and ipmilan stonith plugin auto-building.
- Added further information on v1 => v2 upgrade to pkg-message.
- Added MAKE_JOBS_SAFE as the port can be parallel built.

New files:
- files/heartbeat.in
- files/patch-doc-ha.cf

Removed files:
- files/patch-heartbeat-init.d-heartbeat.in


- Justin
Comment 9 dfilter freebsd_committer 2009-12-16 03:40:36 UTC
glarkin     2009-12-16 03:40:26 UTC

  FreeBSD ports repository

  Modified files:
    sysutils/heartbeat   Makefile pkg-plist 
    sysutils/heartbeat/files pkg-install.in pkg-message.in 
  Added files:
    sysutils/heartbeat/files heartbeat.in patch-doc-ha.cf 
  Removed files:
    sysutils/heartbeat/files patch-heartbeat-init.d-heartbeat.in 
  Log:
  - Proper FreeBSD startup script is now available.
  - Building with NOPORTDOCS succeeds.
  - Added drac3 and apcmastersnmp stonith plugin install options.
  - Workaround for vacm, bladehpi, and ipmilan stonith plugin auto-building.
  - Added further information on v1 => v2 upgrade to pkg-message.
  - Added MAKE_JOBS_SAFE as the port can be parallel built.
  - Bumped PORTREVISION
  
  PR:             ports/139132
  Submitted by:   Justin Head <ports@encarnate.com>
  
  Revision  Changes    Path
  1.24      +60 -3     ports/sysutils/heartbeat/Makefile
  1.1       +211 -0    ports/sysutils/heartbeat/files/heartbeat.in (new)
  1.1       +17 -0     ports/sysutils/heartbeat/files/patch-doc-ha.cf (new)
  1.2       +0 -39     ports/sysutils/heartbeat/files/patch-heartbeat-init.d-heartbeat.in (dead)
  1.6       +4 -3      ports/sysutils/heartbeat/files/pkg-install.in
  1.2       +7 -0      ports/sysutils/heartbeat/files/pkg-message.in
  1.7       +15 -0     ports/sysutils/heartbeat/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 10 glarkin freebsd_committer 2009-12-16 03:40:46 UTC
State Changed
From-To: feedback->closed

Committed, thank you!