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.'' |
| 123 | If 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].'' |
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 | |
| 159 | The 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 | |
| 163 | When 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: |
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) : |