modify installation directory for packages?

55 views
Skip to first unread message

Jeremy Koerber

unread,
Apr 8, 2015, 6:13:46 PM4/8/15
to scalr-...@googlegroups.com
Hi!

Just wondering if there's a way to have the packages install to /mnt/scalr-server instead of /opt/scalr-server. I tried just setting up a symlink, and that seems to work fine for everything except RRD. Supervisord complains that rrd was unable to be started:

Chef Client failed. 27 resources updated in 31.668522857 seconds
[2015-04-08T21:40:49+00:00] ERROR: supervisor_service[rrd] (scalr-server::group_rrd_enabled line 31) had an error: RuntimeError: Supervisor service rrd was unable to be started
[2015-04-08T21:40:49+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
root@ip-10-44-18-144:/home/ubuntu# less /opt/scalr-server/embedded/cookbooks/cache/chef-stacktrace.out

It works fine if I change /opt/scalr-server/etc/supervisor/conf.d/rrd.conf to have:

[program:rrd]
command=/mnt/scalr-server/embedded/bin/rrdcached -s scalr-app -l unix:/mnt/scalr-server/var/run/rrd/rrdcached.sock -p /mnt/scalr-server/var/run/rrd/rrdcached.pid -j /mnt/scalr-server/var/lib/rrd/journal -F -b /mnt/scalr-server/var/lib/rrd -B -g

For some reason RRD doesn't seem to like the symlink and wants the direct path. I see the following in /opt/scalr-server/var/log/supervisor/rrd.err:

Base directory (-b) resolved via file system links!
Please consult rrdcached '-b' documentation!
 
And as soon as I change the rrd.conf file and restart supervisord, it's fine again. But it gets reset every time I run scalr-server-ctl reconfigure.

Thanks!
Jeremy

Thomas Orozco

unread,
Apr 8, 2015, 6:46:03 PM4/8/15
to scalr-...@googlegroups.com
Jeremy,

This is indeed not really supported, though you might be able to get it to work using the following workaround:
- Install the package
- Symlink /opt/scalr-server/* into /mnt/scalr-server/. Make sure you symlink only the dirs that came with the package (not the ones created by reconfigure) and that you symlink the immediate children dirs, not /opt/scalr-server itself.
- Edit /opt/scalr-server/embedded/cookbooks/scalr-server/attributes/default.rb and change default[:scalr_server][:install_root] to "/mnt/scalr-server".
- Run scalr-server-ctl reconfigure

Now, this will break next time you upgrade the package since default.rb will be reverted, but assuming it does work, I could expose this attribute in scalr-server.rb. 

However, I'd like to first understand what you're trying to do here: are you just trying to ensure your data is persisted? If so, would it be possible for you to mount at /opt/scalr-server/var/lib instead?

Cheers, 

-- Thomas | Product Manager @ Scalr | tho...@scalr.com | www.scalr.com | blog.scalr.com

--
You received this message because you are subscribed to the Google Groups "scalr-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalr-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jeremy Koerber

unread,
Apr 8, 2015, 8:55:58 PM4/8/15
to scalr-...@googlegroups.com
Thanks Thomas. That seems to work. The only reason I was attempting this is because my root volume is only 8GB and AWS automatically set up /dev/sdb to mount at /mnt. Just basically trying to avoid filling up the root drive. Mounting /dev/sdb below /opt will totally work. I was really just curious if that was configurable.

thanks!

You received this message because you are subscribed to a topic in the Google Groups "scalr-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scalr-discuss/fVnPHIwyXi0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scalr-discus...@googlegroups.com.

Dhiren Patil

unread,
Nov 6, 2015, 12:37:46 PM11/6/15
to scalr-discuss
Hi Thomas,

If the scalr home directory attribute could be expose in scalr-server.rb, it would help us as well.  In our case, the default storage mounts on our internal server is always /opt/mount1 or /opt/mount2.  These mounts are backed up for us as well.  Changing the mounts is quite lenghty process in our org.


Thanks
Reply all
Reply to author
Forward
0 new messages