1.27 release - universal setup script, watchdog as a service and more improvements

27 views
Skip to first unread message

Матюхин Вячеслав

unread,
Apr 17, 2011, 2:10:19 PM4/17/11
to ubic...@googlegroups.com, Sawyer X
I just uploaded 1.27 release on CPAN (also .deb package on launchpad).
It includes some important changes which I wanted to add for a long time.
 
Please read the following text and help me to test this new release in different environments!
 
First of all, it includes "ubic-admin" script, which supports only one command by now, "setup".
"ubic-admin setup" asks several configuration questions, with sane defaults to every one, and installation process can now be simplified to:
"cpanm Ubic && ubic-admin setup --batch-mode".
Since 1.25 release, Ubic also works on Mac OS X, FreeBSD and pretty much any POSIX-compatible systems out there, so this script can be used there as well.
Moreover, setup process detect whether you run it from root or from non-root user, and if latter is the case, it configures everything right in your home folder.
 
This is related to the next set of improvements: ubic now requires config file.
It can be either in ~/.ubic.cfg or /etc/ubic/ubic.cfg, and can be generated with this "ubic-admin setup" command.
So if you're upgrading from previous releases, you'll have to run it once (otherwise, all "ubic <blah>" commands will refuse to work).
Debian users which use .deb package don't have to worry, though, upgrade should be transparent for them thanks to postinst script.
 
One more note about non-root installation: config file contains new option "default_user". For non-root installation in home folder, this option is set to current user, so people won't have to put "user => $ENV{LOGNAME}" or "user => 'someone'" in every service config.
Shared hosting users should be happy with this, I guess :)
 
"ubic-watchdog" and "ubic-update" are services now (instead of cron jobs), and "ubic-ping" got renamed to "ubic.ping" for consistency.
By now, this is done by intermediate script which runs persistently as a service and runs these two scripts every minute.
In the future, "ubic.watchdog" will receive more attention and heavily refactored.
 
One last change is that "ubic status" command prints non-cached service status for non-root users if current user is equal to service's user. All cached statuses contain "[cached]" postfix to distinguish them from non-cached ones.
 
OK, so even if you're using non-debian package, you should:
  * run 'ubic-admin setup' command after upgrade (add --batch-mode option if you don't care about questions it asks, or just press "enter" several times).
  * manually edit your /etc/cron.d/ubic crontab file (or wherever you put old cron jobs) and remove everything from there; "ubic-admin setup" will ask you for new "ubic-watchdog ubic.watchdog" cron job, but it'll probably put it into /var/spool/cron/crontabs/root instead of /etc/cron.d/)
  * stop old ubic-ping service and remove /etc/ubic/service/ubic-ping config (even if you use it, it got renamed to /etc/ubic/service/ubic/ping).
 
Feedback on troubles with upgrade, syntax errors in setup texts, and any other suggestions will be much appreciated.
 
PS: Full changes:
        * ubic-admin script:
         - system-wide setup with one command 'ubic-admin setup'
         - home directory setup with the same 'ubic-admin setup' command
         - batch-mode with flag "--batch-mode"
        * configurable default_user (very helpful for home directory setup)
        * 'ubic status' changes:
         - real status will be checked and printed if current user is equal
           to service user
         - "Not a root, printing cached statuses" message removed;
           instead, 'ubic status' will print "[cached]" note for every cached status

Матюхин Вячеслав

unread,
Apr 21, 2011, 3:36:53 PM4/21/11
to ubic...@googlegroups.com
1.27 release introduced new bug: "ubic status", when being invoked from the root user, displayed cached status for non-root services.
This is now fixed and things are back to normal, "ubic status" from the root user always performs actual status checks (you can always use "ubic cached-status" to see cached statuses).
 
Other than this, 1.27 release so far is pretty stable.
 
Also I made ubic.ping status check more robust - it checked the service by http without the timeout, so watchdog never had a chance to restart broken service.
 
Full changes:
        * 'ubic status' always shows non-cached statuses if called by root
        * ubic.ping status now uses sane timeout when it checks service via http
 
 
Reply all
Reply to author
Forward
0 new messages