Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rikkotec Github.com and pcsd Makefile Patch For GNU/Linux #55

Closed
wants to merge 8 commits into from
Closed

Rikkotec Github.com and pcsd Makefile Patch For GNU/Linux #55

wants to merge 8 commits into from

Conversation

kirvedx
Copy link
Contributor

@kirvedx kirvedx commented Mar 13, 2015

Source Updates

  • Provided support for building pcsd on GNU/Linux, specifically Debian. See pcsd/Makefile
  • Added README.md to the source, which Github favors over README - and which presents a prettier and more readable documentation via the Github.com web project interface with updated documentation for GNU/Linux users in the pcsd installation steps.
  • Updated README file to include additional information for GNU/Linux users in the pcsd installation steps.

Additional Notes

  • Tested on Debian Jessie, with Pacemaker 1.11 and Corosync 2.x from experimental.
  • I did not use sudo for make get_gems in the pcsd directory, this worked fine as non-root.
  • I had to run sudo make install, and sudo make install_pcsd in order to get privileges to create directories and copy files.
  • I had to run sudo systemctl daemon-reload before I could utilize pcsd via systemctl start pcsd.service
  • A warning is displayed when you sudo make install_pcsd from ruby, explaining not to install gems as the
    root user...this was unavoidable for me - but I'm new to Ruby, perhaps there is a way to avoid that.
  • Using sudo should not be too much of a problem on Debian, as you can only use Pacemaker and
    Corosync as root anyhow. File permission changes would be necessary through the whole cluster stack.
  • I left an additional else in the ifeq blocks of pcsd/Makefile for Debian, in order to provide others a sort of place-holder for helping them to support additional Debian versions, since I didn't do any extensive testing.

kirvedx added 8 commits March 13, 2015 17:09
- Provided support for building PCSD on GNU/Linux, specifically Debian.

[NOTES]
- Tested on Debian Jessie, with Pacemaker 1.11 and Corosync 2.x from experimental.
- I had to run sudo make install, and sudo make install_pcsd - followed by sudo systemctl daemon-reload
- Just to see if Github takes it over README and to test it.
- Just an improvement for visitors, and adds some additional information

Change-Id: I41e9217432d9c588205c2032793e39b034f26bab
Signed-off-by: Richard B Winters <rik@mmogp.com>
- Some changes to text formatting
- Formatting updates
- Updating text formatting once more.
- Added additional information to pcsd installation steps for GNU/Linux users
Rikkotec Github and pcsd Makefile Patch
@kirvedx
Copy link
Contributor Author

kirvedx commented Mar 13, 2015

Oh well there is one change you'll probably want to make:

pcsd may also necessary in order to follow the guides on the clusterlabs.org website.

It's in the new README.md file, and it should read:

pcsd may also be necessary in order to follow the guides on the clusterlabs.org website.

And I did not add that line to REAMDE either, if you wanted to do that as well.


I knew I missed something ><

And there's more:

It installed ok, but didn't run so well. I had to modify /etc/init.d/pcsd in order for the service to work:

  • Install daemon sudo apt-get install daemon

  • Modify the following in /etc/init.d/pcsd:

    Line 21

    . /lib/lsb/init-functions

    Line 24

    exec="/usr/bin/ruby2.1"

    Line 26

    config="/usr/lib/pcsd"

    Line 38

    daemon -n $prog -X "$exec -I/usr/lib/pcsd /usr/lib/pcsd/ssl.rb"

Stating using /etc/init.d/pcsd start makes the daemon's status active(running)

Restarting and/or starting via sudo service pcsd start or sudo systemctl start pcsd.service causes it to load as active (exited).

@kirvedx
Copy link
Contributor Author

kirvedx commented Mar 24, 2015

So I'm going to leave this here so that you may cherry-pick from it if you like. Though I've decided to package for Debian this project -> as I've had to build the entire cluster stack from source due to the shape and outdated state of Debian's packages. I guess this is one of those itches

So with that said, if you just want to take the README.md and reject the pull request, I can just add the necessary rules to debian/rules in the package I'll create, and provide a proper init there as well.

Though, if you want to take that too and make it work to build from source on Debian as well -> I'll make another commit on this pull-request with the changes stated above, and more; within the next couple of days - tested.

Best,

@tomjelinek
Copy link
Member

Thank you for the fix and notes.

I cherry-picked your changes in README files.
Proposed Makefile fix seems to be more complex than necessary so I'm not going to use that. I made a simple fix instead. Checking for other distributions may be added when needed.

Changes of /etc/init.d/pcsd seem to be incompatible with RHEL. We do not want to break compatibility with one distribution when adding support for another.

@kirvedx
Copy link
Contributor Author

kirvedx commented Mar 24, 2015

@tomjelinek

Thank you for the fix and notes.

No problem, it was more notes than fixing - but still :)

Proposed Makefile fix seems to be more complex than necessary so I'm not going to use that. I
made a simple fix instead. Checking for other distributions may be added when needed.

The makefile I wasn't sure about -> I didn't think it needed to be that involved but I don't know enough about RHEL to have made a better fix without knowing Debian support was there and not breaking RHEL.

Changes of /etc/init.d/pcsd seem to be incompatible with RHEL. We do not want to break compatibility
with one distribution when adding support for another.

The init script I know is dead wrong - even for Debian (my edit that is). I saw in the other pull-request that you cherry-picked; so I decided to submit pull request assuming you might review notes/cherry-pick things you wanted since it wasn't so huge of a difference.

I'm actually packaging pcs for Debian as we speak. I can introduce makefile rules in debian/rules (but if you fixed it then probably wont need to do that). And a new init script can be used specific to Debian via the package as well, without messing with upstream source.

Thanks for your reply, I'll give it a test if the changes to the makefile are updated in master :)

@kirvedx kirvedx closed this May 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants