Changes between Version 16 and Version 17 of Doc/SCDB/Server


Ignore:
Timestamp:
Dec 2, 2009, 7:07:36 PM (16 years ago)
Author:
/O=GRID-FR/C=FR/O=CNRS/OU=LAL/CN=Michel Jouvin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Doc/SCDB/Server

    v16 v17  
    121121== Troubleshooting Server-side Scripts ==
    122122
    123 If there is a problem during deployment, after entering command `ant deploy`, people listed in `NOTIFY` variable of hook script should receive an email describing the problem. With some misconfiguration, it can happen you don't receive an email about the deployment failure.
    124 
    125 ''Note : `ant deploy` reports a success even if something wrong happens during deployment : `ant` success or failure only reflects Subversion commit (implied by `ant deploy`) status.''
     123If there is a problem during deployment, after entering command `ant deploy`, people listed in `notify_to` configuration option of the [#SubversionHookScript hook script] should receive an email describing the problem. If they don't receive an email about the deployment failure, check your SMTP configuration and your notification parameters.
     124
     125''Note : notification on deployment failures is optional and errors should be reported through the `ant` command since [milestone:SCDB-2.3.0 SCDB 2.3.0].''
    126126
    127127To troubleshoot server side configuration problems, it is necessary to execute manually the server scripts. This is a two-step processes :
    128  1. Check successful execution of deployment script, `build-tag.pl`.
     128 1. Check successful execution of deployment script, `build-tag.py`.
    129129 1. Check successful execution of SVN hook script.
    130130
    131131=== Troubleshooting deployment script ===
    132132
    133 ''To troubleshoot deployment script, `build-tag.pl`, you must log on the Quattor server as the user configured to run deployment script (generally `root`).''
     133''To troubleshoot deployment script, `build-tag.py`, you must log on the Quattor server as the user configured to run deployment script (generally `root`).''
    134134
    135135The step-by-step procedure to troubleshoot deployment script (examples below assume it is in default location `/root/quattor/scripts`) is :
    136  1. Look in `/etc/build-tag.conf', if it exists, location of SVN cache on the Quattor server. Default location (`/root/quattor/svncache`) is assumed in following examples : replace with the appropriate location for your site.
     136 1. Look in `/etc/quattor-deploy.conf` the location of SVN cache on the Quattor server. If it is not defined, the default location is `/root/quattor/svncache`. In the following steps, replace this default location by whatever is appropriate at your site.
    137137 1. Check the last tag checked out with the following command :
    138138{{{
     
    144144svn update
    145145}}}
    146  1. Try to redeploy the same tag with the following command :
    147 {{{
    148 /root/quattor/scripts/build-tag.pl TAG-VALUE
     146 1. Try to redeploy the same tag, enabling verbose output, with the following command :
     147{{{
     148/root/quattor/scripts/build-tag.py --debug TAG-VALUE
    149149}}}
    150150
    151151If SVN cache is empty (not recognized as a valid SVN working copy by `svn info`), you need to identify last tag in `tags` branch of Quattor SCDB repository using `svn ls`.
    152152
     153''Note: if you are still using the obsolete deployment script, `build-tag.pl`, most of the troubleshooting steps should apply but you need to adapt the configuration file and script names.''
     154
    153155=== Troubleshooting SVN hook script ===
    154156
    155 ''Most of the deployment problems, after initial configuration, are related to deployment script. As the hook script mainly launches the deployment script, it is important complete previous checks before troubleshooting SVN hook script.''
    156 
    157 Main causes for problems with hook script are invalid SSH keys for communication with Quattor server and invalid configuration for the hook script. Follow the following steps to identify the problem :
    158 
     157'''Most of the deployment problems, after initial configuration, are related to [#Troubleshootingdeploymentscript Deployment script]. As the hook script mainly launches the deployment script, it is important to complete previous checks before troubleshooting SVN hook script.'''
     158
     159The main cause of problems in the hook scripts is related to launching the deployment script from the hook script. The reason for the problems and the troubleshooting steps are different whether you use `sudo` or `ssh` to run the deployment script on the Quattor deployment server.
     160 * When using `ssh`, the main reason is invalid SSH keys for communication between SVN server and the Quattor server and invalid configuration. To troubleshoot this, log in to the Subversion server as the same user as your SVN server (generally Apache account) and try to ssh to the Quattor deployment server using the same account as the one used by the deployment script (typically  `root`).
     161 * When using `sudo`, log in to the Subversion server as the same user as your SVN server (generally Apache account) and try to sudo under the deployment account (the one used to run the deployment script, typically `root`). One well-known issue with recent version of `sudo` is that you need to enable the use of `sudo` by processes without a tty (this must be done with `visudo`).
     162
     163When you assessed the ability to launch the deployment script is working properly, try to execute the hook script under the SVN server account. This involves the following steps:
    159164 1. Log on Subversion server as the same user as your Subversion server (generally Apache account).
    160  1. Try to ssh to Quattor server as the user used to run deployment script (generally root).
    161  1. Retrieve the repository revision where the last tag was created. If the tag has been successfully deployed, the easiest is to use `svn log --limit 1` in SVN cache directory on Quattor server. Else, you need to identify the last tag created in repository with `svn ls` and run `svn log --limit 1` on the corresponding URL.
    162  1. Go to the `hooks` directory of Subversion SCDB repository and run the following command (`REPOSITORY_PATH` is the filesystem path to repository) :
     165 1. Retrieve the repository revision associated with the last deployment tag. For this, you need to run `svn log --limit 1 tag_url` (with `tag_url` the URL associated with the tag branch of the Quattor repository).
     166 1. Go to the `hooks` directory of Subversion SCDB repository and run the following command (`REPOSITORY_PATH` is the filesystem path to the repository) :
    163167{{{
    164168./post-commit REPOSITY_PATH REVISION