deployphp / deployer

The PHP deployment tool with support for popular frameworks out of the box
https://deployer.org
MIT License
10.63k stars 1.49k forks source link

Not deploying properly, no current symlink, just directory #1357

Closed Toriniasty closed 7 years ago

Toriniasty commented 7 years ago
Q A
Issue Type Bug
Deployer Version 6.0.3
Local Machine OS Debian 8.9
Remote Machine OS Red Hat Enterprise Linux Server release 6.8 (Santiago)

Description

When deploying to stage/dev environments with similar code we didn't encounter any problems. However when we deploy to prod host, we encounter weird behaviour where the symlink for current is not being created properly. Directory structure looks like that:

11:03:43 root@web-b-prod:0:/home/www/html/php7/whv3:#> ls -l
total 12
drwxr-xr-x. 3 root root 4096 Sep  8 10:58 current
drwxr-xr-x. 3 root root 4096 Sep  8 10:57 releases
drwxr-xr-x. 4 root root 4096 Sep  8 10:58 shared
11:05:01 root@web-b-prod:0:/home/www/html/php7/whv3:#> ls -l current/
total 4
lrwxrwxrwx. 1 root root   40 Sep  8 10:58 1 -> /home/www/html/php7/whv3/releases/1
drwxr-xr-x. 3 root root 4096 Sep  8 10:58 var
11:05:06 root@web-b-prod:0:/home/www/html/php7/whv3:#> ls -l current/1
lrwxrwxrwx. 1 root root 40 Sep  8 10:58 current/1 -> /home/www/html/php7/WebHookV3/releases/1
11:05:18 root@web-b-prod:2:/home/www/html/php7/whv3:#> ls -l current/var/
total 4
drwxr-xr-x. 5 root root 4096 Sep  8 10:58 oml

Normally we would expect, current to point to newest release as we had on other environments.

Steps to reproduce

dep --no-ansi --no-interaction -vvv deploy prod

Content of deploy.php

<?php
namespace Deployer;
require 'recipe/symfony3.php';

set('application', 'whv3');
set('repository', 'git@git.host:Alerting/whv3.git');
set('git_tty', false);
add('shared_files', []);
add('shared_dirs', ['var/oml']);
add('writable_dirs', ['var/oml', 'var/oml/*']);

// Writable dirs by web server
add('writable_dirs', []);
set('allow_anonymous_stats', false);

// Hosts
host('root@web-b-prod')
    ->stage('prod')
    ->forwardAgent()
    ->set('bin/php', '/usr/bin/php70')
    ->set('deploy_path', '/home/www/html/php7/{{application}}');

//Task configuration
//Task to update schema after deployment
task('deploy:schema:update', function () {
    run('{{bin/php}} {{bin/console}} doctrine:schema:update --force');
})->desc('Update database schema');

//Build task
task('build', function () {
    run('cd {{release_path}} && build');
});

//Move configuration files based on stage
task('move:config:files', function() {
    $stage = null;
    if (input()->hasArgument('stage')) {
        $stage = input()->getArgument('stage');
    }

    if ($stage =='prod') {
        run('cd {{release_path}}/app/config;
            cp parameters_prod.yml parameters.yml;
            cp configuration_prod.yml configuration.yml;
            cd {{release_path}}/bin;
            ./v3_daemon.sh stop;
            ./v3_daemon.sh start');
    }
});

//Define when to run proper tasks
//Move config files before the build
after('deploy:update_code','move:config:files');

//If deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');

//Update database schema
before('deploy:symlink','deploy:schema:update');

Output log

With enabled option for verbose output -vvv.

$ dep --no-ansi --no-interaction -vvv deploy prod
[localhost] > export SYMFONY_ENV='prod'; git rev-parse --abbrev-ref HEAD
[localhost] < production
✈︎ Deploying production on root@web-b-prod
• done on [root@web-b-prod]
➤ Executing task deploy:prepare
[root@web-b-prod] > export SYMFONY_ENV='prod'; echo $0
[root@web-b-prod] < ssh multiplexing initialization
[root@web-b-prod] < bash
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ ! -d /home/www/html/php7/whv3 ]; then mkdir -p /home/www/html/php7/whv3; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ ! -L /home/www/html/php7/whv3/current ] && [ -d /home/www/html/php7/whv3/current ]; then echo 'true'; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && if [ ! -d .dep ]; then mkdir .dep; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && if [ ! -d releases ]; then mkdir releases; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && if [ ! -d shared ]; then mkdir shared; fi
• done on [root@web-b-prod]
✔ Ok [609ms]
➤ Executing task deploy:lock
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -f /home/www/html/php7/whv3/.dep/deploy.lock ]; then echo 'true'; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; touch /home/www/html/php7/whv3/.dep/deploy.lock
• done on [root@web-b-prod]
✔ Ok [86ms]
➤ Executing task deploy:release
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (if [ -h release ]; then echo 'true'; fi)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (if [ -d releases ] && [ "$(ls -A releases)" ]; then echo 'true'; fi)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (if [ -d /home/www/html/php7/whv3/releases/1 ]; then echo 'true'; fi)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (date +"%Y%m%d%H%M%S")
[root@web-b-prod] < 20170908105759
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (echo '20170908105759,1' >> .dep/releases)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (mkdir /home/www/html/php7/whv3/releases/1)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (if [[ $(man ln 2>&1 || ln -h 2>&1 || ln --help 2>&1) =~ '--relative' ]]; then echo 'true'; fi)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (ln -nfs /home/www/html/php7/whv3/releases/1 /home/www/html/php7/whv3/release)
• done on [root@web-b-prod]
✔ Ok [340ms]
➤ Executing task deploy:update_code
[root@web-b-prod] > export SYMFONY_ENV='prod'; if hash command 2>/dev/null; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; command -v 'git'
[root@web-b-prod] < /usr/bin/git
[root@web-b-prod] > export SYMFONY_ENV='prod'; /usr/bin/git version
[root@web-b-prod] < git version 1.7.1
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -h /home/www/html/php7/whv3/release ]; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; readlink /home/www/html/php7/whv3/release
[root@web-b-prod] < /home/www/html/php7/whv3/releases/1
[root@web-b-prod] > export SYMFONY_ENV='prod'; /usr/bin/git clone -b production --depth 1 --recursive -q git@git.host:Alerting/whv3.git /home/www/html/php7/whv3/releases/1 2>&1
• done on [root@web-b-prod]
✔ Ok [706ms]
➤ Executing task move:config:files
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1/app/config;
            cp parameters_prod.yml parameters.yml;
            cp configuration_prod.yml configuration.yml;
            cd /home/www/html/php7/whv3/releases/1/bin;
            ./v3_daemon.sh stop;
            ./v3_daemon.sh start
[root@web-b-prod] < Stopping ./v3_daemon.sh:
[root@web-b-prod] < [OK]
[root@web-b-prod] < Starting ./v3_daemon.sh:
[root@web-b-prod] < [OK]
• done on [root@web-b-prod]
✔ Ok [1s 119ms]
➤ Executing task deploy:clear_paths
[root@web-b-prod] > export SYMFONY_ENV='prod';  rm -rf /home/www/html/php7/whv3/releases/1/web/app_*.php
[root@web-b-prod] > export SYMFONY_ENV='prod';  rm -rf /home/www/html/php7/whv3/releases/1/web/config.php
• done on [root@web-b-prod]
✔ Ok [77ms]
➤ Executing task deploy:create_cache_dir
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -d "/home/www/html/php7/whv3/releases/1/var/cache" ]; then rm -rf /home/www/html/php7/whv3/releases/1/var/cache; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; mkdir -p /home/www/html/php7/whv3/releases/1/var/cache
[root@web-b-prod] > export SYMFONY_ENV='prod'; chmod -R g+w /home/www/html/php7/whv3/releases/1/var/cache
• done on [root@web-b-prod]
✔ Ok [119ms]
➤ Executing task deploy:shared
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -d /home/www/html/php7/whv3/shared/var/logs ]; then echo 'true'; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; mkdir -p /home/www/html/php7/whv3/shared/var/logs
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -d $(echo /home/www/html/php7/whv3/releases/1/var/logs) ]; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; cp -rv /home/www/html/php7/whv3/releases/1/var/logs /home/www/html/php7/whv3/shared/var
[root@web-b-prod] < `/home/www/html/php7/whv3/releases/1/var/logs/.gitkeep' -> `/home/www/html/php7/whv3/shared/var/logs/.gitkeep'
[root@web-b-prod] > export SYMFONY_ENV='prod'; rm -rf /home/www/html/php7/whv3/releases/1/var/logs
[root@web-b-prod] > export SYMFONY_ENV='prod'; mkdir -p `dirname /home/www/html/php7/whv3/releases/1/var/logs`
[root@web-b-prod] > export SYMFONY_ENV='prod'; ln -nfs /home/www/html/php7/whv3/shared/var/logs /home/www/html/php7/whv3/releases/1/var/logs
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -d /home/www/html/php7/whv3/shared/var/sessions ]; then echo 'true'; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; mkdir -p /home/www/html/php7/whv3/shared/var/sessions
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -d $(echo /home/www/html/php7/whv3/releases/1/var/sessions) ]; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; cp -rv /home/www/html/php7/whv3/releases/1/var/sessions /home/www/html/php7/whv3/shared/var
[root@web-b-prod] < `/home/www/html/php7/whv3/releases/1/var/sessions/.gitkeep' -> `/home/www/html/php7/whv3/shared/var/sessions/.gitkeep'
[root@web-b-prod] > export SYMFONY_ENV='prod'; rm -rf /home/www/html/php7/whv3/releases/1/var/sessions
[root@web-b-prod] > export SYMFONY_ENV='prod'; mkdir -p `dirname /home/www/html/php7/whv3/releases/1/var/sessions`
[root@web-b-prod] > export SYMFONY_ENV='prod'; ln -nfs /home/www/html/php7/whv3/shared/var/sessions /home/www/html/php7/whv3/releases/1/var/sessions
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -d /home/www/html/php7/whv3/shared/var/oml ]; then echo 'true'; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; mkdir -p /home/www/html/php7/whv3/shared/var/oml
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -d $(echo /home/www/html/php7/whv3/releases/1/var/oml) ]; then echo 'true'; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; rm -rf /home/www/html/php7/whv3/releases/1/var/oml
[root@web-b-prod] > export SYMFONY_ENV='prod'; mkdir -p `dirname /home/www/html/php7/whv3/releases/1/var/oml`
[root@web-b-prod] > export SYMFONY_ENV='prod'; ln -nfs /home/www/html/php7/whv3/shared/var/oml /home/www/html/php7/whv3/releases/1/var/oml
[root@web-b-prod] > export SYMFONY_ENV='prod'; mkdir -p /home/www/html/php7/whv3/shared/app/config
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -f /home/www/html/php7/whv3/shared/app/config/parameters.yml ]; then echo 'true'; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -f /home/www/html/php7/whv3/releases/1/app/config/parameters.yml ]; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; cp -rv /home/www/html/php7/whv3/releases/1/app/config/parameters.yml /home/www/html/php7/whv3/shared/app/config/parameters.yml
[root@web-b-prod] < `/home/www/html/php7/whv3/releases/1/app/config/parameters.yml' -> `/home/www/html/php7/whv3/shared/app/config/parameters.yml'
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -f $(echo /home/www/html/php7/whv3/releases/1/app/config/parameters.yml) ]; then rm -rf /home/www/html/php7/whv3/releases/1/app/config/parameters.yml; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ ! -d $(echo /home/www/html/php7/whv3/releases/1/app/config) ]; then mkdir -p /home/www/html/php7/whv3/releases/1/app/config;fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; touch /home/www/html/php7/whv3/shared/app/config/parameters.yml
[root@web-b-prod] > export SYMFONY_ENV='prod'; ln -nfs /home/www/html/php7/whv3/shared/app/config/parameters.yml /home/www/html/php7/whv3/releases/1/app/config/parameters.yml
• done on [root@web-b-prod]
✔ Ok [1s 139ms]
➤ Executing task deploy:assets
[root@web-b-prod] > export SYMFONY_ENV='prod'; find /home/www/html/php7/whv3/releases/1/web/css /home/www/html/php7/whv3/releases/1/web/images /home/www/html/php7/whv3/releases/1/web/js -exec touch -t 201709080958.03 {} ';' &> /dev/null || true
• done on [root@web-b-prod]
✔ Ok [55ms]
➤ Executing task deploy:vendors
[root@web-b-prod] > export SYMFONY_ENV='prod'; if hash unzip 2>/dev/null; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; if hash composer 2>/dev/null; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; if hash command 2>/dev/null; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; command -v 'composer'
[root@web-b-prod] < /usr/local/bin/composer
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && /usr/bin/php70 /usr/local/bin/composer install --verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader
[root@web-b-prod] < Do not run Composer as root/super user! See https://getcomposer.org/root for details
[root@web-b-prod] < Loading composer repositories with package information
[root@web-b-prod] < Installing dependencies from lock file
[root@web-b-prod] < Dependency resolution completed in 0.000 seconds
[root@web-b-prod] < Analyzed 109 packages to resolve dependencies
[root@web-b-prod] < Analyzed 236 rules to resolve dependencies
[root@web-b-prod] < Package operations: 51 installs, 0 updates, 0 removals
[root@web-b-prod] < Installs: doctrine/lexer:v1.0.1, doctrine/annotations:v1.2.7, doctrine/collections:v1.3.0, doctrine/inflector:v1.1.0, doctrine/cache:v1.6.2, doctrine/common:v2.6.2, doctrine/dbal:v2.5.13, twig/twig:v1.34.4, symfony/polyfill-util:v1.4.0, paragonie/random_compat:v2.0.10, symfony/polyfill-php70:v1.4.0, symfony/polyfill-php56:v1.4.0, symfony/polyfill-mbstring:v1.4.0, symfony/symfony:v3.3.6, symfony/polyfill-intl-icu:v1.4.0, psr/simple-cache:1.0.0, psr/log:1.0.2, psr/link:1.0.0, psr/container:1.0.0, psr/cache:1.0.1, fig/link-util:1.0.0, doctrine/doctrine-cache-bundle:1.3.0, doctrine/instantiator:1.0.5, willdurand/negotiation:v2.3.1, willdurand/jsonp-callback-validator:v1.1.0, friendsofsymfony/rest-bundle:2.2.0, friendsofsymfony/user-bundle:v2.0.1, psr/http-message:1.0.1, guzzlehttp/psr7:1.4.2, guzzlehttp/promises:v1.3.1, guzzlehttp/guzzle:6.3.0, incenteev/composer-parameter-handler:v2.1.2, twig/extensions:v1.5.1, sensio/framework-extra-bundle:v3.0.26, pagerfanta/pagerfanta:v1.0.5, doctrine/orm:v2.5.6, jdorn/sql-formatter:v1.2.17, doctrine/doctrine-bundle:1.6.8, javiereguiluz/easyadmin-bundle:v1.16.12, michelf/php-markdown:1.7.0, nelmio/api-doc-bundle:2.13.2, ramsey/uuid:3.7.0, composer/ca-bundle:1.0.7, sensiolabs/security-checker:v4.1.1, sensio/distribution-bundle:v5.0.20, monolog/monolog:1.23.0, symfony/monolog-bundle:v3.1.0, symfony/polyfill-apcu:v1.4.0, swiftmailer/swiftmailer:v5.4.8, symfony/swiftmailer-bundle:v2.6.3, white-october/pagerfanta-bundle:v1.0.8
[root@web-b-prod] <   - Installing doctrine/lexer (v1.0.1):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing doctrine/annotations (v1.2.7):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing doctrine/collections (v1.3.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing doctrine/inflector (v1.1.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing doctrine/cache (v1.6.2):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing doctrine/common (v2.6.2): Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing doctrine/dbal (v2.5.13): Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing twig/twig (v1.34.4):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing symfony/polyfill-util (v1.4.0): Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing paragonie/random_compat (v2.0.10):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing symfony/polyfill-php70 (v1.4.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing symfony/polyfill-php56 (v1.4.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing symfony/polyfill-mbstring (v1.4.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing symfony/symfony (v3.3.6):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing symfony/polyfill-intl-icu (v1.4.0): Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing psr/simple-cache (1.0.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing psr/log (1.0.2): Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing psr/link (1.0.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing psr/container (1.0.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing psr/cache (1.0.1):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing fig/link-util (1.0.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing doctrine/doctrine-cache-bundle (1.3.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing doctrine/instantiator (1.0.5):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing willdurand/negotiation (v2.3.1):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing willdurand/jsonp-callback-validator (v1.1.0): Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing friendsofsymfony/rest-bundle (2.2.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing friendsofsymfony/user-bundle (v2.0.1):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing psr/http-message (1.0.1):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing guzzlehttp/psr7 (1.4.2):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing guzzlehttp/promises (v1.3.1):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing guzzlehttp/guzzle (6.3.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing incenteev/composer-parameter-handler (v2.1.2): Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing twig/extensions (v1.5.1):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing sensio/framework-extra-bundle (v3.0.26):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing pagerfanta/pagerfanta (v1.0.5): Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing doctrine/orm (v2.5.6):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing jdorn/sql-formatter (v1.2.17): Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing doctrine/doctrine-bundle (1.6.8):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing javiereguiluz/easyadmin-bundle (v1.16.12):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing michelf/php-markdown (1.7.0): Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing nelmio/api-doc-bundle (2.13.2):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing ramsey/uuid (3.7.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing composer/ca-bundle (1.0.7):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing sensiolabs/security-checker (v4.1.1):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing sensio/distribution-bundle (v5.0.20):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing monolog/monolog (1.23.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing symfony/monolog-bundle (v3.1.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing symfony/polyfill-apcu (v1.4.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing swiftmailer/swiftmailer (v5.4.8):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing symfony/swiftmailer-bundle (v2.6.3): Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing white-october/pagerfanta-bundle (v1.0.8):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] < Generating optimized autoload files
[root@web-b-prod] < > post-install-cmd: @symfony-scripts
[root@web-b-prod] < > symfony-scripts: Incenteev\ParameterHandler\ScriptHandler::buildParameters
[root@web-b-prod] < Updating the "app/config/parameters.yml" file
[root@web-b-prod] < > symfony-scripts: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
[root@web-b-prod] < > symfony-scripts: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
[root@web-b-prod] <  // Clearing the cache for the prod environment with debug
[root@web-b-prod] <  // false
[root@web-b-prod] <  [OK] Cache for the "prod" environment (debug=false) was successfully cleared.
[root@web-b-prod] < > symfony-scripts: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets
[root@web-b-prod] <  Trying to install assets as relative symbolic links.
[root@web-b-prod] <  --- ------------------------------ ------------------
[root@web-b-prod] <       Bundle                         Method / Error
[root@web-b-prod] <  --- ------------------------------ ------------------
[root@web-b-prod] <   ✔   EasyAdminBundle                relative symlink
[root@web-b-prod] <   ✔   NelmioApiDocBundle             relative symlink
[root@web-b-prod] <   ✔   WhiteOctoberPagerfantaBundle   relative symlink
[root@web-b-prod] <  --- ------------------------------ ------------------
[root@web-b-prod] <  [OK] All assets were successfully installed.
[root@web-b-prod] < > symfony-scripts: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile
[root@web-b-prod] < > symfony-scripts: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::prepareDeploymentTarget
• done on [root@web-b-prod]
✔ Ok [5s 986ms]
➤ Executing task deploy:assets:install
[root@web-b-prod] > export SYMFONY_ENV='prod'; /usr/bin/php70 /home/www/html/php7/whv3/releases/1/bin/console assets:install --no-interaction --env=prod --no-debug /home/www/html/php7/whv3/releases/1/web
[root@web-b-prod] <  Installing assets as hard copies.
[root@web-b-prod] <  --- ------------------------------ ----------------
[root@web-b-prod] <       Bundle                         Method / Error
[root@web-b-prod] <  --- ------------------------------ ----------------
[root@web-b-prod] <   ✔   EasyAdminBundle                copy
[root@web-b-prod] <   ✔   NelmioApiDocBundle             copy
[root@web-b-prod] <   ✔   WhiteOctoberPagerfantaBundle   copy
[root@web-b-prod] <  --- ------------------------------ ----------------
[root@web-b-prod] <  ! [NOTE] Some assets were installed via copy. If you make changes to these
[root@web-b-prod] <  !        assets you have to run this command again.
[root@web-b-prod] <  [OK] All assets were successfully installed.
• done on [root@web-b-prod]
✔ Ok [139ms]
➤ Executing task deploy:assetic:dump
• done on [root@web-b-prod]
✔ Ok [0ms]
➤ Executing task deploy:cache:clear
[root@web-b-prod] > export SYMFONY_ENV='prod'; /usr/bin/php70 /home/www/html/php7/whv3/releases/1/bin/console cache:clear --no-interaction --env=prod --no-debug --no-warmup
[root@web-b-prod] <  // Clearing the cache for the prod environment with debug
[root@web-b-prod] <  // false
[root@web-b-prod] <  [OK] Cache for the "prod" environment (debug=false) was successfully cleared.
• done on [root@web-b-prod]
✔ Ok [129ms]
➤ Executing task deploy:cache:warmup
[root@web-b-prod] > export SYMFONY_ENV='prod'; /usr/bin/php70 /home/www/html/php7/whv3/releases/1/bin/console cache:warmup --no-interaction --env=prod --no-debug
[root@web-b-prod] <  // Warming up the cache for the prod environment with debug
[root@web-b-prod] <  // false
[root@web-b-prod] <  [OK] Cache for the "prod" environment (debug=false) was successfully warmed.
• done on [root@web-b-prod]
✔ Ok [2s 492ms]
➤ Executing task deploy:writable
[root@web-b-prod] > export SYMFONY_ENV='prod'; ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\  -f1
[root@web-b-prod] < apache
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (mkdir -p var/cache var/logs var/sessions var/oml var/oml/*)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (chmod 2>&1; true)
[root@web-b-prod] < chmod: missing operand
[root@web-b-prod] < Try `chmod --help' for more information.
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (if hash setfacl 2>/dev/null; then echo 'true'; fi)
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (getfacl -p var/cache | grep "^user:apache:.*w" | wc -l)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -RL -m u:"apache":rwX -m u:`whoami`:rwX var/cache)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -dRL -m u:"apache":rwX -m u:`whoami`:rwX var/cache)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (getfacl -p var/logs | grep "^user:apache:.*w" | wc -l)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -RL -m u:"apache":rwX -m u:`whoami`:rwX var/logs)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -dRL -m u:"apache":rwX -m u:`whoami`:rwX var/logs)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (getfacl -p var/sessions | grep "^user:apache:.*w" | wc -l)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -RL -m u:"apache":rwX -m u:`whoami`:rwX var/sessions)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -dRL -m u:"apache":rwX -m u:`whoami`:rwX var/sessions)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (getfacl -p var/oml | grep "^user:apache:.*w" | wc -l)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -RL -m u:"apache":rwX -m u:`whoami`:rwX var/oml)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -dRL -m u:"apache":rwX -m u:`whoami`:rwX var/oml)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (getfacl -p var/oml/* | grep "^user:apache:.*w" | wc -l)
[root@web-b-prod] < 1
• done on [root@web-b-prod]
✔ Ok [732ms]
➤ Executing task deploy:schema:update
[root@web-b-prod] > export SYMFONY_ENV='prod'; /usr/bin/php70 /home/www/html/php7/whv3/releases/1/bin/console doctrine:schema:update --force
[root@web-b-prod] < Nothing to update - your database is already in sync with the current entity metadata.
• done on [root@web-b-prod]
✔ Ok [233ms]
➤ Executing task deploy:symlink
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [[ $(man mv 2>&1 || mv -h 2>&1 || mv --help 2>&1) =~ '--no-target-directory' ]]; then echo 'true'; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && ln -nfs /home/www/html/php7/whv3/releases/1 current
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && rm release
• done on [root@web-b-prod]
✔ Ok [219ms]
➤ Executing task deploy:unlock
[root@web-b-prod] > export SYMFONY_ENV='prod'; rm -f /home/www/html/php7/whv3/.dep/deploy.lock
• done on [root@web-b-prod]
✔ Ok [37ms]
➤ Executing task cleanup
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && if [ -e release ]; then  rm release; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && if [ -h release ]; then  rm release; fi
• done on [root@web-b-prod]
✔ Ok [80ms]
Successfully deployed!
Toriniasty commented 7 years ago

I've managed to workaround issue by removing current/ directory and creating symlink myself to proper release. After this, next deployment properly handles symlink creation/update:

[localhost] > export SYMFONY_ENV='prod'; git rev-parse --abbrev-ref HEAD
[localhost] < production
✈︎ Deploying production on root@web-b-prod
• done on [root@web-b-prod]
➤ Executing task deploy:prepare
[root@web-b-prod] > export SYMFONY_ENV='prod'; echo $0
[root@web-b-prod] < bash
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ ! -d /home/www/html/php7/whv3 ]; then mkdir -p /home/www/html/php7/whv3; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ ! -L /home/www/html/php7/whv3/current ] && [ -d /home/www/html/php7/whv3/current ]; then echo 'true'; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && if [ ! -d .dep ]; then mkdir .dep; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && if [ ! -d releases ]; then mkdir releases; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && if [ ! -d shared ]; then mkdir shared; fi
• done on [root@web-b-prod]
✔ Ok [211ms]
➤ Executing task deploy:lock
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -f /home/www/html/php7/whv3/.dep/deploy.lock ]; then echo 'true'; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; touch /home/www/html/php7/whv3/.dep/deploy.lock
• done on [root@web-b-prod]
✔ Ok [73ms]
➤ Executing task deploy:release
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (if [ -h release ]; then echo 'true'; fi)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (if [ -d releases ] && [ "$(ls -A releases)" ]; then echo 'true'; fi)
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (cd releases && ls -t -1 -d */)
[root@web-b-prod] < 1/
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (if [ -f .dep/releases ]; then echo 'true'; fi)
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (tail -n 15 .dep/releases)
[root@web-b-prod] < 20170908112056,1
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (if [ -d /home/www/html/php7/whv3/releases/2 ]; then echo 'true'; fi)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (date +"%Y%m%d%H%M%S")
[root@web-b-prod] < 20170908112143
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (echo '20170908112143,2' >> .dep/releases)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (mkdir /home/www/html/php7/whv3/releases/2)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (if [[ $(man ln 2>&1 || ln -h 2>&1 || ln --help 2>&1) =~ '--relative' ]]; then echo 'true'; fi)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (ln -nfs /home/www/html/php7/whv3/releases/2 /home/www/html/php7/whv3/release)
• done on [root@web-b-prod]
✔ Ok [432ms]
➤ Executing task deploy:update_code
[root@web-b-prod] > export SYMFONY_ENV='prod'; if hash command 2>/dev/null; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; command -v 'git'
[root@web-b-prod] < /usr/bin/git
[root@web-b-prod] > export SYMFONY_ENV='prod'; /usr/bin/git version
[root@web-b-prod] < git version 1.7.1
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -h /home/www/html/php7/whv3/release ]; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; readlink /home/www/html/php7/whv3/release
[root@web-b-prod] < /home/www/html/php7/whv3/releases/2
[root@web-b-prod] > export SYMFONY_ENV='prod'; /usr/bin/git clone -b production --depth 1 --recursive -q git@git.host:Alerting/whv3.git /home/www/html/php7/whv3/releases/2 2>&1
• done on [root@web-b-prod]
✔ Ok [635ms]
➤ Executing task move:config:files
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/2/app/config;
            cp parameters_prod.yml parameters.yml;
            cp configuration_prod.yml configuration.yml;
            cd /home/www/html/php7/whv3/releases/2/bin;
            ./v3_daemon.sh stop;
            ./v3_daemon.sh start
[root@web-b-prod] < Stopping ./v3_daemon.sh:
[root@web-b-prod] < [OK]
[root@web-b-prod] < Starting ./v3_daemon.sh:
[root@web-b-prod] < [OK]
• done on [root@web-b-prod]
✔ Ok [1s 105ms]
➤ Executing task deploy:clear_paths
[root@web-b-prod] > export SYMFONY_ENV='prod';  rm -rf /home/www/html/php7/whv3/releases/2/web/app_*.php
[root@web-b-prod] > export SYMFONY_ENV='prod';  rm -rf /home/www/html/php7/whv3/releases/2/web/config.php
• done on [root@web-b-prod]
✔ Ok [75ms]
➤ Executing task deploy:create_cache_dir
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -d "/home/www/html/php7/whv3/releases/2/var/cache" ]; then rm -rf /home/www/html/php7/whv3/releases/2/var/cache; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; mkdir -p /home/www/html/php7/whv3/releases/2/var/cache
[root@web-b-prod] > export SYMFONY_ENV='prod'; chmod -R g+w /home/www/html/php7/whv3/releases/2/var/cache
• done on [root@web-b-prod]
✔ Ok [115ms]
➤ Executing task deploy:shared
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -d /home/www/html/php7/whv3/shared/var/logs ]; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; rm -rf /home/www/html/php7/whv3/releases/2/var/logs
[root@web-b-prod] > export SYMFONY_ENV='prod'; mkdir -p `dirname /home/www/html/php7/whv3/releases/2/var/logs`
[root@web-b-prod] > export SYMFONY_ENV='prod'; ln -nfs /home/www/html/php7/whv3/shared/var/logs /home/www/html/php7/whv3/releases/2/var/logs
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -d /home/www/html/php7/whv3/shared/var/sessions ]; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; rm -rf /home/www/html/php7/whv3/releases/2/var/sessions
[root@web-b-prod] > export SYMFONY_ENV='prod'; mkdir -p `dirname /home/www/html/php7/whv3/releases/2/var/sessions`
[root@web-b-prod] > export SYMFONY_ENV='prod'; ln -nfs /home/www/html/php7/whv3/shared/var/sessions /home/www/html/php7/whv3/releases/2/var/sessions
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -d /home/www/html/php7/whv3/shared/var/oml ]; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; rm -rf /home/www/html/php7/whv3/releases/2/var/oml
[root@web-b-prod] > export SYMFONY_ENV='prod'; mkdir -p `dirname /home/www/html/php7/whv3/releases/2/var/oml`
[root@web-b-prod] > export SYMFONY_ENV='prod'; ln -nfs /home/www/html/php7/whv3/shared/var/oml /home/www/html/php7/whv3/releases/2/var/oml
[root@web-b-prod] > export SYMFONY_ENV='prod'; mkdir -p /home/www/html/php7/whv3/shared/app/config
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -f /home/www/html/php7/whv3/shared/app/config/parameters.yml ]; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -f $(echo /home/www/html/php7/whv3/releases/2/app/config/parameters.yml) ]; then rm -rf /home/www/html/php7/whv3/releases/2/app/config/parameters.yml; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ ! -d $(echo /home/www/html/php7/whv3/releases/2/app/config) ]; then mkdir -p /home/www/html/php7/whv3/releases/2/app/config;fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; touch /home/www/html/php7/whv3/shared/app/config/parameters.yml
[root@web-b-prod] > export SYMFONY_ENV='prod'; ln -nfs /home/www/html/php7/whv3/shared/app/config/parameters.yml /home/www/html/php7/whv3/releases/2/app/config/parameters.yml
• done on [root@web-b-prod]
✔ Ok [657ms]
➤ Executing task deploy:assets
[root@web-b-prod] > export SYMFONY_ENV='prod'; find /home/www/html/php7/whv3/releases/2/web/css /home/www/html/php7/whv3/releases/2/web/images /home/www/html/php7/whv3/releases/2/web/js -exec touch -t 201709081021.46 {} ';' &> /dev/null || true
• done on [root@web-b-prod]
✔ Ok [43ms]
➤ Executing task deploy:vendors
[root@web-b-prod] > export SYMFONY_ENV='prod'; if hash unzip 2>/dev/null; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; if hash composer 2>/dev/null; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; if hash command 2>/dev/null; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; command -v 'composer'
[root@web-b-prod] < /usr/local/bin/composer
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/2 && /usr/bin/php70 /usr/local/bin/composer install --verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader
[root@web-b-prod] < Do not run Composer as root/super user! See https://getcomposer.org/root for details
[root@web-b-prod] < Loading composer repositories with package information
[root@web-b-prod] < Installing dependencies from lock file
[root@web-b-prod] < Dependency resolution completed in 0.000 seconds
[root@web-b-prod] < Analyzed 109 packages to resolve dependencies
[root@web-b-prod] < Analyzed 236 rules to resolve dependencies
[root@web-b-prod] < Package operations: 51 installs, 0 updates, 0 removals
[root@web-b-prod] < Installs: doctrine/lexer:v1.0.1, doctrine/annotations:v1.2.7, doctrine/collections:v1.3.0, doctrine/inflector:v1.1.0, doctrine/cache:v1.6.2, doctrine/common:v2.6.2, doctrine/dbal:v2.5.13, twig/twig:v1.34.4, symfony/polyfill-util:v1.4.0, paragonie/random_compat:v2.0.10, symfony/polyfill-php70:v1.4.0, symfony/polyfill-php56:v1.4.0, symfony/polyfill-mbstring:v1.4.0, symfony/symfony:v3.3.6, symfony/polyfill-intl-icu:v1.4.0, psr/simple-cache:1.0.0, psr/log:1.0.2, psr/link:1.0.0, psr/container:1.0.0, psr/cache:1.0.1, fig/link-util:1.0.0, doctrine/doctrine-cache-bundle:1.3.0, doctrine/instantiator:1.0.5, willdurand/negotiation:v2.3.1, willdurand/jsonp-callback-validator:v1.1.0, friendsofsymfony/rest-bundle:2.2.0, friendsofsymfony/user-bundle:v2.0.1, psr/http-message:1.0.1, guzzlehttp/psr7:1.4.2, guzzlehttp/promises:v1.3.1, guzzlehttp/guzzle:6.3.0, incenteev/composer-parameter-handler:v2.1.2, twig/extensions:v1.5.1, sensio/framework-extra-bundle:v3.0.26, pagerfanta/pagerfanta:v1.0.5, doctrine/orm:v2.5.6, jdorn/sql-formatter:v1.2.17, doctrine/doctrine-bundle:1.6.8, javiereguiluz/easyadmin-bundle:v1.16.12, michelf/php-markdown:1.7.0, nelmio/api-doc-bundle:2.13.2, ramsey/uuid:3.7.0, composer/ca-bundle:1.0.7, sensiolabs/security-checker:v4.1.1, sensio/distribution-bundle:v5.0.20, monolog/monolog:1.23.0, symfony/monolog-bundle:v3.1.0, symfony/polyfill-apcu:v1.4.0, swiftmailer/swiftmailer:v5.4.8, symfony/swiftmailer-bundle:v2.6.3, white-october/pagerfanta-bundle:v1.0.8
[root@web-b-prod] <   - Installing doctrine/lexer (v1.0.1):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing doctrine/annotations (v1.2.7):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing doctrine/collections (v1.3.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing doctrine/inflector (v1.1.0): Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing doctrine/cache (v1.6.2): Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing doctrine/common (v2.6.2):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing doctrine/dbal (v2.5.13): Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing twig/twig (v1.34.4):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing symfony/polyfill-util (v1.4.0): Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing paragonie/random_compat (v2.0.10):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing symfony/polyfill-php70 (v1.4.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing symfony/polyfill-php56 (v1.4.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing symfony/polyfill-mbstring (v1.4.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing symfony/symfony (v3.3.6):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing symfony/polyfill-intl-icu (v1.4.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing psr/simple-cache (1.0.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing psr/log (1.0.2):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing psr/link (1.0.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing psr/container (1.0.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing psr/cache (1.0.1):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing fig/link-util (1.0.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing doctrine/doctrine-cache-bundle (1.3.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing doctrine/instantiator (1.0.5):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing willdurand/negotiation (v2.3.1):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing willdurand/jsonp-callback-validator (v1.1.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing friendsofsymfony/rest-bundle (2.2.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing friendsofsymfony/user-bundle (v2.0.1):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing psr/http-message (1.0.1):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing guzzlehttp/psr7 (1.4.2):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing guzzlehttp/promises (v1.3.1):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing guzzlehttp/guzzle (6.3.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing incenteev/composer-parameter-handler (v2.1.2):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing twig/extensions (v1.5.1):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing sensio/framework-extra-bundle (v3.0.26):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing pagerfanta/pagerfanta (v1.0.5):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing doctrine/orm (v2.5.6):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing jdorn/sql-formatter (v1.2.17):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing doctrine/doctrine-bundle (1.6.8):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing javiereguiluz/easyadmin-bundle (v1.16.12):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing michelf/php-markdown (1.7.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing nelmio/api-doc-bundle (2.13.2):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing ramsey/uuid (3.7.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing composer/ca-bundle (1.0.7):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing sensiolabs/security-checker (v4.1.1):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing sensio/distribution-bundle (v5.0.20):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing monolog/monolog (1.23.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing symfony/monolog-bundle (v3.1.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing symfony/polyfill-apcu (v1.4.0):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing swiftmailer/swiftmailer (v5.4.8):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing symfony/swiftmailer-bundle (v2.6.3): Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] <   - Installing white-october/pagerfanta-bundle (v1.0.8):
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] < Generating optimized autoload files
[root@web-b-prod] < > post-install-cmd: @symfony-scripts
[root@web-b-prod] < > symfony-scripts: Incenteev\ParameterHandler\ScriptHandler::buildParameters
[root@web-b-prod] < Updating the "app/config/parameters.yml" file
[root@web-b-prod] < > symfony-scripts: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
[root@web-b-prod] < > symfony-scripts: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
[root@web-b-prod] <  // Clearing the cache for the prod environment with debug
[root@web-b-prod] <  // false
[root@web-b-prod] <  [OK] Cache for the "prod" environment (debug=false) was successfully cleared.
[root@web-b-prod] < > symfony-scripts: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets
[root@web-b-prod] <  Trying to install assets as relative symbolic links.
[root@web-b-prod] <  --- ------------------------------ ------------------
[root@web-b-prod] <       Bundle                         Method / Error
[root@web-b-prod] <  --- ------------------------------ ------------------
[root@web-b-prod] <   ✔   EasyAdminBundle                relative symlink
[root@web-b-prod] <   ✔   NelmioApiDocBundle             relative symlink
[root@web-b-prod] <   ✔   WhiteOctoberPagerfantaBundle   relative symlink
[root@web-b-prod] <  --- ------------------------------ ------------------
[root@web-b-prod] <  [OK] All assets were successfully installed.
[root@web-b-prod] < > symfony-scripts: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile
[root@web-b-prod] < > symfony-scripts: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::prepareDeploymentTarget
• done on [root@web-b-prod]
✔ Ok [5s 779ms]
➤ Executing task deploy:assets:install
[root@web-b-prod] > export SYMFONY_ENV='prod'; /usr/bin/php70 /home/www/html/php7/whv3/releases/2/bin/console assets:install --no-interaction --env=prod --no-debug /home/www/html/php7/whv3/releases/2/web
[root@web-b-prod] <  Installing assets as hard copies.
[root@web-b-prod] <  --- ------------------------------ ----------------
[root@web-b-prod] <       Bundle                         Method / Error
[root@web-b-prod] <  --- ------------------------------ ----------------
[root@web-b-prod] <   ✔   EasyAdminBundle                copy
[root@web-b-prod] <   ✔   NelmioApiDocBundle             copy
[root@web-b-prod] <   ✔   WhiteOctoberPagerfantaBundle   copy
[root@web-b-prod] <  --- ------------------------------ ----------------
[root@web-b-prod] <  ! [NOTE] Some assets were installed via copy. If you make changes to these
[root@web-b-prod] <  !        assets you have to run this command again.
[root@web-b-prod] <  [OK] All assets were successfully installed.
• done on [root@web-b-prod]
✔ Ok [151ms]
➤ Executing task deploy:assetic:dump
• done on [root@web-b-prod]
✔ Ok [0ms]
➤ Executing task deploy:cache:clear
[root@web-b-prod] > export SYMFONY_ENV='prod'; /usr/bin/php70 /home/www/html/php7/whv3/releases/2/bin/console cache:clear --no-interaction --env=prod --no-debug --no-warmup
[root@web-b-prod] <  // Clearing the cache for the prod environment with debug
[root@web-b-prod] <  // false
[root@web-b-prod] <  [OK] Cache for the "prod" environment (debug=false) was successfully cleared.
• done on [root@web-b-prod]
✔ Ok [134ms]
➤ Executing task deploy:cache:warmup
[root@web-b-prod] > export SYMFONY_ENV='prod'; /usr/bin/php70 /home/www/html/php7/whv3/releases/2/bin/console cache:warmup --no-interaction --env=prod --no-debug
[root@web-b-prod] <  // Warming up the cache for the prod environment with debug
[root@web-b-prod] <  // false
[root@web-b-prod] <  [OK] Cache for the "prod" environment (debug=false) was successfully warmed.
• done on [root@web-b-prod]
✔ Ok [2s 540ms]
➤ Executing task deploy:writable
[root@web-b-prod] > export SYMFONY_ENV='prod'; ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\  -f1
[root@web-b-prod] < apache
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/2 && (mkdir -p var/cache var/logs var/sessions var/oml var/oml/*)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/2 && (chmod 2>&1; true)
[root@web-b-prod] < chmod: missing operand
[root@web-b-prod] < Try `chmod --help' for more information.
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/2 && (if hash setfacl 2>/dev/null; then echo 'true'; fi)
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/2 && (getfacl -p var/cache | grep "^user:apache:.*w" | wc -l)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/2 && (setfacl -RL -m u:"apache":rwX -m u:`whoami`:rwX var/cache)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/2 && (setfacl -dRL -m u:"apache":rwX -m u:`whoami`:rwX var/cache)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/2 && (getfacl -p var/logs | grep "^user:apache:.*w" | wc -l)
[root@web-b-prod] < 2
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/2 && (getfacl -p var/sessions | grep "^user:apache:.*w" | wc -l)
[root@web-b-prod] < 2
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/2 && (getfacl -p var/oml | grep "^user:apache:.*w" | wc -l)
[root@web-b-prod] < 5
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/2 && (getfacl -p var/oml/* | grep "^user:apache:.*w" | wc -l)
[root@web-b-prod] < 4
• done on [root@web-b-prod]
✔ Ok [470ms]
➤ Executing task deploy:schema:update
[root@web-b-prod] > export SYMFONY_ENV='prod'; /usr/bin/php70 /home/www/html/php7/whv3/releases/2/bin/console doctrine:schema:update --force
[root@web-b-prod] < Nothing to update - your database is already in sync with the current entity metadata.
• done on [root@web-b-prod]
✔ Ok [182ms]
➤ Executing task deploy:symlink
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [[ $(man mv 2>&1 || mv -h 2>&1 || mv --help 2>&1) =~ '--no-target-directory' ]]; then echo 'true'; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && ln -nfs /home/www/html/php7/whv3/releases/2 current
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && rm release
• done on [root@web-b-prod]
✔ Ok [129ms]
➤ Executing task deploy:unlock
[root@web-b-prod] > export SYMFONY_ENV='prod'; rm -f /home/www/html/php7/whv3/.dep/deploy.lock
• done on [root@web-b-prod]
✔ Ok [33ms]
➤ Executing task cleanup
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && if [ -e release ]; then  rm release; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && if [ -h release ]; then  rm release; fi
• done on [root@web-b-prod]
✔ Ok [74ms]
Successfully deployed!
jenkins@jenkins:~/jobs/Web API/jobs/whv3 - PROD/workspace$
antonmedv commented 7 years ago

If everything is okay now, I'm closing this.

Toriniasty commented 7 years ago

well yeah, but with every single new deployment we might have the same issue not knowing why.... so maybe it would be good to investigate more as more people might have the same problem.

so if it's possible please reopen, and i can help you investigate if some help would be needed.

antonmedv commented 7 years ago

Please provide a minimal, self-contained, reproducing test case that shows the problem you are reporting.

antonmedv commented 7 years ago

What coreutils version do you use?

Toriniasty commented 7 years ago

Hey Anton, Core utils on the server that runs the deployer is 8.23, the server where the package is deployed it is 8.4.

What kind of test case are you thinking of, what exactly would you need?

antonmedv commented 7 years ago

I'm thinking of https://github.com/deployphp/deployer/blob/master/KNOWN_BUGS.md#ubuntu-1404-coreutils-821

Try this set('use_relative_symlink', false);

Toriniasty commented 7 years ago

Just tried that, unfortunately with the same result and no symlink created, output from -vvv

dep deploy prod -vvv
[localhost] > export SYMFONY_ENV='prod'; git rev-parse --abbrev-ref HEAD
[localhost] < production
✈︎ Deploying production on root@web-a-prod
• done on [root@web-a-prod]
[localhost] > export SYMFONY_ENV='prod'; git rev-parse --abbrev-ref HEAD
[localhost] < production
✈︎ Deploying production on root@web-b-prod
• done on [root@web-b-prod]
➤ Executing task deploy:prepare
[root@web-a-prod] > export SYMFONY_ENV='prod'; echo $0
[root@web-a-prod] < ssh multiplexing initialization
[root@web-a-prod] < bash
[root@web-a-prod] > export SYMFONY_ENV='prod'; if [ ! -d /home/www/html/php7/whv3 ]; then mkdir -p /home/www/html/php7/whv3; fi
[root@web-a-prod] > export SYMFONY_ENV='prod'; if [ ! -L /home/www/html/php7/whv3/current ] && [ -d /home/www/html/php7/whv3/current ]; then echo 'true'; fi
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && if [ ! -d .dep ]; then mkdir .dep; fi
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && if [ ! -d releases ]; then mkdir releases; fi
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && if [ ! -d shared ]; then mkdir shared; fi
• done on [root@web-a-prod]
[root@web-b-prod] > export SYMFONY_ENV='prod'; echo $0
[root@web-b-prod] < ssh multiplexing initialization
[root@web-b-prod] < bash
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ ! -d /home/www/html/php7/whv3 ]; then mkdir -p /home/www/html/php7/whv3; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ ! -L /home/www/html/php7/whv3/current ] && [ -d /home/www/html/php7/whv3/current ]; then echo 'true'; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && if [ ! -d .dep ]; then mkdir .dep; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && if [ ! -d releases ]; then mkdir releases; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && if [ ! -d shared ]; then mkdir shared; fi
• done on [root@web-b-prod]
✔ Ok [998ms]
➤ Executing task deploy:lock
[root@web-a-prod] > export SYMFONY_ENV='prod'; if [ -f /home/www/html/php7/whv3/.dep/deploy.lock ]; then echo 'true'; fi
[root@web-a-prod] > export SYMFONY_ENV='prod'; touch /home/www/html/php7/whv3/.dep/deploy.lock
• done on [root@web-a-prod]
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -f /home/www/html/php7/whv3/.dep/deploy.lock ]; then echo 'true'; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; touch /home/www/html/php7/whv3/.dep/deploy.lock
• done on [root@web-b-prod]
✔ Ok [145ms]
➤ Executing task deploy:release
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (if [ -h release ]; then echo 'true'; fi)
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (if [ -d releases ] && [ "$(ls -A releases)" ]; then echo 'true'; fi)
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (if [ -d /home/www/html/php7/whv3/releases/1 ]; then echo 'true'; fi)
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (date +"%Y%m%d%H%M%S")
[root@web-a-prod] < 20170912114815
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (echo '20170912114815,1' >> .dep/releases)
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (mkdir /home/www/html/php7/whv3/releases/1)
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (ln -nfs /home/www/html/php7/whv3/releases/1 /home/www/html/php7/whv3/release)
• done on [root@web-a-prod]
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (if [ -h release ]; then echo 'true'; fi)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (if [ -d releases ] && [ "$(ls -A releases)" ]; then echo 'true'; fi)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (if [ -d /home/www/html/php7/whv3/releases/1 ]; then echo 'true'; fi)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (date +"%Y%m%d%H%M%S")
[root@web-b-prod] < 20170912114815
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (echo '20170912114815,1' >> .dep/releases)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (mkdir /home/www/html/php7/whv3/releases/1)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && (ln -nfs /home/www/html/php7/whv3/releases/1 /home/www/html/php7/whv3/release)
• done on [root@web-b-prod]
✔ Ok [503ms]
➤ Executing task deploy:update_code
[root@web-a-prod] > export SYMFONY_ENV='prod'; if hash command 2>/dev/null; then echo 'true'; fi
[root@web-a-prod] < true
[root@web-a-prod] > export SYMFONY_ENV='prod'; command -v 'git'
[root@web-a-prod] < /usr/bin/git
[root@web-a-prod] > export SYMFONY_ENV='prod'; /usr/bin/git version
[root@web-a-prod] < git version 1.7.1
[root@web-a-prod] > export SYMFONY_ENV='prod'; if [ -h /home/www/html/php7/whv3/release ]; then echo 'true'; fi
[root@web-a-prod] < true
[root@web-a-prod] > export SYMFONY_ENV='prod'; readlink /home/www/html/php7/whv3/release
[root@web-a-prod] < /home/www/html/php7/whv3/releases/1
[root@web-a-prod] > export SYMFONY_ENV='prod'; /usr/bin/git clone -b production --depth 1 --recursive -q git@git.host:Alerting/whv3.git /home/www/html/php7/whv3/releases/1 2>&1
• done on [root@web-a-prod]
[root@web-b-prod] > export SYMFONY_ENV='prod'; if hash command 2>/dev/null; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; command -v 'git'
[root@web-b-prod] < /usr/bin/git
[root@web-b-prod] > export SYMFONY_ENV='prod'; /usr/bin/git version
[root@web-b-prod] < git version 1.7.1
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -h /home/www/html/php7/whv3/release ]; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; readlink /home/www/html/php7/whv3/release
[root@web-b-prod] < /home/www/html/php7/whv3/releases/1
[root@web-b-prod] > export SYMFONY_ENV='prod'; /usr/bin/git clone -b production --depth 1 --recursive -q git@git.host:Alerting/whv3.git /home/www/html/php7/whv3/releases/1 2>&1
• done on [root@web-b-prod]
✔ Ok [1s 311ms]
➤ Executing task move:config:files
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1/app/config;
                        cp parameters_prod.yml parameters.yml;
                        cp configuration_prod.yml configuration.yml;
                        cd /home/www/html/php7/whv3/releases/1/bin;
                        ./v3_daemon.sh stop;
                        ./v3_daemon.sh start
[root@web-a-prod] < Stopping ./v3_daemon.sh:
[root@web-a-prod] < [OK]
[root@web-a-prod] < Starting ./v3_daemon.sh:
[root@web-a-prod] < [OK]
• done on [root@web-a-prod]
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1/app/config;
                        cp parameters_prod.yml parameters.yml;
                        cp configuration_prod.yml configuration.yml;
                        cd /home/www/html/php7/whv3/releases/1/bin;
                        ./v3_daemon.sh stop;
                        ./v3_daemon.sh start
[root@web-b-prod] < Stopping ./v3_daemon.sh:
[root@web-b-prod] < [OK]
[root@web-b-prod] < Starting ./v3_daemon.sh:
[root@web-b-prod] < [OK]
• done on [root@web-b-prod]
✔ Ok [2s 221ms]
➤ Executing task deploy:clear_paths
[root@web-a-prod] > export SYMFONY_ENV='prod';  rm -rf /home/www/html/php7/whv3/releases/1/web/app_*.php
[root@web-a-prod] > export SYMFONY_ENV='prod';  rm -rf /home/www/html/php7/whv3/releases/1/web/config.php
• done on [root@web-a-prod]
[root@web-b-prod] > export SYMFONY_ENV='prod';  rm -rf /home/www/html/php7/whv3/releases/1/web/app_*.php
[root@web-b-prod] > export SYMFONY_ENV='prod';  rm -rf /home/www/html/php7/whv3/releases/1/web/config.php
• done on [root@web-b-prod]
✔ Ok [157ms]
➤ Executing task deploy:create_cache_dir
[root@web-a-prod] > export SYMFONY_ENV='prod'; if [ -d "/home/www/html/php7/whv3/releases/1/var/cache" ]; then rm -rf /home/www/html/php7/whv3/releases/1/var/cache; fi
[root@web-a-prod] > export SYMFONY_ENV='prod'; mkdir -p /home/www/html/php7/whv3/releases/1/var/cache
[root@web-a-prod] > export SYMFONY_ENV='prod'; chmod -R g+w /home/www/html/php7/whv3/releases/1/var/cache
• done on [root@web-a-prod]
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -d "/home/www/html/php7/whv3/releases/1/var/cache" ]; then rm -rf /home/www/html/php7/whv3/releases/1/var/cache; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; mkdir -p /home/www/html/php7/whv3/releases/1/var/cache
[root@web-b-prod] > export SYMFONY_ENV='prod'; chmod -R g+w /home/www/html/php7/whv3/releases/1/var/cache
• done on [root@web-b-prod]
✔ Ok [226ms]
➤ Executing task deploy:shared
[root@web-a-prod] > export SYMFONY_ENV='prod'; if [ -d /home/www/html/php7/whv3/shared/var/logs ]; then echo 'true'; fi
[root@web-a-prod] > export SYMFONY_ENV='prod'; mkdir -p /home/www/html/php7/whv3/shared/var/logs
[root@web-a-prod] > export SYMFONY_ENV='prod'; if [ -d $(echo /home/www/html/php7/whv3/releases/1/var/logs) ]; then echo 'true'; fi
[root@web-a-prod] < true
[root@web-a-prod] > export SYMFONY_ENV='prod'; cp -rv /home/www/html/php7/whv3/releases/1/var/logs /home/www/html/php7/whv3/shared/var
[root@web-a-prod] < `/home/www/html/php7/whv3/releases/1/var/logs/.gitkeep' -> `/home/www/html/php7/whv3/shared/var/logs/.gitkeep'
[root@web-a-prod] > export SYMFONY_ENV='prod'; rm -rf /home/www/html/php7/whv3/releases/1/var/logs
[root@web-a-prod] > export SYMFONY_ENV='prod'; mkdir -p `dirname /home/www/html/php7/whv3/releases/1/var/logs`
[root@web-a-prod] > export SYMFONY_ENV='prod'; ln -nfs /home/www/html/php7/whv3/shared/var/logs /home/www/html/php7/whv3/releases/1/var/logs
[root@web-a-prod] > export SYMFONY_ENV='prod'; if [ -d /home/www/html/php7/whv3/shared/var/sessions ]; then echo 'true'; fi
[root@web-a-prod] > export SYMFONY_ENV='prod'; mkdir -p /home/www/html/php7/whv3/shared/var/sessions
[root@web-a-prod] > export SYMFONY_ENV='prod'; if [ -d $(echo /home/www/html/php7/whv3/releases/1/var/sessions) ]; then echo 'true'; fi
[root@web-a-prod] < true
[root@web-a-prod] > export SYMFONY_ENV='prod'; cp -rv /home/www/html/php7/whv3/releases/1/var/sessions /home/www/html/php7/whv3/shared/var
[root@web-a-prod] < `/home/www/html/php7/whv3/releases/1/var/sessions/.gitkeep' -> `/home/www/html/php7/whv3/shared/var/sessions/.gitkeep'
[root@web-a-prod] > export SYMFONY_ENV='prod'; rm -rf /home/www/html/php7/whv3/releases/1/var/sessions
[root@web-a-prod] > export SYMFONY_ENV='prod'; mkdir -p `dirname /home/www/html/php7/whv3/releases/1/var/sessions`
[root@web-a-prod] > export SYMFONY_ENV='prod'; ln -nfs /home/www/html/php7/whv3/shared/var/sessions /home/www/html/php7/whv3/releases/1/var/sessions
[root@web-a-prod] > export SYMFONY_ENV='prod'; if [ -d /home/www/html/php7/whv3/shared/var/oml ]; then echo 'true'; fi
[root@web-a-prod] > export SYMFONY_ENV='prod'; mkdir -p /home/www/html/php7/whv3/shared/var/oml
[root@web-a-prod] > export SYMFONY_ENV='prod'; if [ -d $(echo /home/www/html/php7/whv3/releases/1/var/oml) ]; then echo 'true'; fi
[root@web-a-prod] > export SYMFONY_ENV='prod'; rm -rf /home/www/html/php7/whv3/releases/1/var/oml
[root@web-a-prod] > export SYMFONY_ENV='prod'; mkdir -p `dirname /home/www/html/php7/whv3/releases/1/var/oml`
[root@web-a-prod] > export SYMFONY_ENV='prod'; ln -nfs /home/www/html/php7/whv3/shared/var/oml /home/www/html/php7/whv3/releases/1/var/oml
[root@web-a-prod] > export SYMFONY_ENV='prod'; mkdir -p /home/www/html/php7/whv3/shared/app/config
[root@web-a-prod] > export SYMFONY_ENV='prod'; if [ -f /home/www/html/php7/whv3/shared/app/config/parameters.yml ]; then echo 'true'; fi
[root@web-a-prod] > export SYMFONY_ENV='prod'; if [ -f /home/www/html/php7/whv3/releases/1/app/config/parameters.yml ]; then echo 'true'; fi
[root@web-a-prod] < true
[root@web-a-prod] > export SYMFONY_ENV='prod'; cp -rv /home/www/html/php7/whv3/releases/1/app/config/parameters.yml /home/www/html/php7/whv3/shared/app/config/parameters.yml
[root@web-a-prod] < `/home/www/html/php7/whv3/releases/1/app/config/parameters.yml' -> `/home/www/html/php7/whv3/shared/app/config/parameters.yml'
[root@web-a-prod] > export SYMFONY_ENV='prod'; if [ -f $(echo /home/www/html/php7/whv3/releases/1/app/config/parameters.yml) ]; then rm -rf /home/www/html/php7/whv3/releases/1/app/config/parameters.yml; fi
[root@web-a-prod] > export SYMFONY_ENV='prod'; if [ ! -d $(echo /home/www/html/php7/whv3/releases/1/app/config) ]; then mkdir -p /home/www/html/php7/whv3/releases/1/app/config;fi
[root@web-a-prod] > export SYMFONY_ENV='prod'; touch /home/www/html/php7/whv3/shared/app/config/parameters.yml
[root@web-a-prod] > export SYMFONY_ENV='prod'; ln -nfs /home/www/html/php7/whv3/shared/app/config/parameters.yml /home/www/html/php7/whv3/releases/1/app/config/parameters.yml
• done on [root@web-a-prod]
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -d /home/www/html/php7/whv3/shared/var/logs ]; then echo 'true'; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; mkdir -p /home/www/html/php7/whv3/shared/var/logs
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -d $(echo /home/www/html/php7/whv3/releases/1/var/logs) ]; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; cp -rv /home/www/html/php7/whv3/releases/1/var/logs /home/www/html/php7/whv3/shared/var
[root@web-b-prod] < `/home/www/html/php7/whv3/releases/1/var/logs/.gitkeep' -> `/home/www/html/php7/whv3/shared/var/logs/.gitkeep'
[root@web-b-prod] > export SYMFONY_ENV='prod'; rm -rf /home/www/html/php7/whv3/releases/1/var/logs
[root@web-b-prod] > export SYMFONY_ENV='prod'; mkdir -p `dirname /home/www/html/php7/whv3/releases/1/var/logs`
[root@web-b-prod] > export SYMFONY_ENV='prod'; ln -nfs /home/www/html/php7/whv3/shared/var/logs /home/www/html/php7/whv3/releases/1/var/logs
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -d /home/www/html/php7/whv3/shared/var/sessions ]; then echo 'true'; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; mkdir -p /home/www/html/php7/whv3/shared/var/sessions
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -d $(echo /home/www/html/php7/whv3/releases/1/var/sessions) ]; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; cp -rv /home/www/html/php7/whv3/releases/1/var/sessions /home/www/html/php7/whv3/shared/var
[root@web-b-prod] < `/home/www/html/php7/whv3/releases/1/var/sessions/.gitkeep' -> `/home/www/html/php7/whv3/shared/var/sessions/.gitkeep'
[root@web-b-prod] > export SYMFONY_ENV='prod'; rm -rf /home/www/html/php7/whv3/releases/1/var/sessions
[root@web-b-prod] > export SYMFONY_ENV='prod'; mkdir -p `dirname /home/www/html/php7/whv3/releases/1/var/sessions`
[root@web-b-prod] > export SYMFONY_ENV='prod'; ln -nfs /home/www/html/php7/whv3/shared/var/sessions /home/www/html/php7/whv3/releases/1/var/sessions
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -d /home/www/html/php7/whv3/shared/var/oml ]; then echo 'true'; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; mkdir -p /home/www/html/php7/whv3/shared/var/oml
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -d $(echo /home/www/html/php7/whv3/releases/1/var/oml) ]; then echo 'true'; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; rm -rf /home/www/html/php7/whv3/releases/1/var/oml
[root@web-b-prod] > export SYMFONY_ENV='prod'; mkdir -p `dirname /home/www/html/php7/whv3/releases/1/var/oml`
[root@web-b-prod] > export SYMFONY_ENV='prod'; ln -nfs /home/www/html/php7/whv3/shared/var/oml /home/www/html/php7/whv3/releases/1/var/oml
[root@web-b-prod] > export SYMFONY_ENV='prod'; mkdir -p /home/www/html/php7/whv3/shared/app/config
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -f /home/www/html/php7/whv3/shared/app/config/parameters.yml ]; then echo 'true'; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -f /home/www/html/php7/whv3/releases/1/app/config/parameters.yml ]; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; cp -rv /home/www/html/php7/whv3/releases/1/app/config/parameters.yml /home/www/html/php7/whv3/shared/app/config/parameters.yml
[root@web-b-prod] < `/home/www/html/php7/whv3/releases/1/app/config/parameters.yml' -> `/home/www/html/php7/whv3/shared/app/config/parameters.yml'
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ -f $(echo /home/www/html/php7/whv3/releases/1/app/config/parameters.yml) ]; then rm -rf /home/www/html/php7/whv3/releases/1/app/config/parameters.yml; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [ ! -d $(echo /home/www/html/php7/whv3/releases/1/app/config) ]; then mkdir -p /home/www/html/php7/whv3/releases/1/app/config;fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; touch /home/www/html/php7/whv3/shared/app/config/parameters.yml
[root@web-b-prod] > export SYMFONY_ENV='prod'; ln -nfs /home/www/html/php7/whv3/shared/app/config/parameters.yml /home/www/html/php7/whv3/releases/1/app/config/parameters.yml
• done on [root@web-b-prod]
✔ Ok [2s 269ms]
➤ Executing task deploy:assets
[root@web-a-prod] > export SYMFONY_ENV='prod'; find /home/www/html/php7/whv3/releases/1/web/css /home/www/html/php7/whv3/releases/1/web/images /home/www/html/php7/whv3/releases/1/web/js -exec touch -t 201709121048.21 {} ';' &> /dev/null || true
• done on [root@web-a-prod]
[root@web-b-prod] > export SYMFONY_ENV='prod'; find /home/www/html/php7/whv3/releases/1/web/css /home/www/html/php7/whv3/releases/1/web/images /home/www/html/php7/whv3/releases/1/web/js -exec touch -t 201709121048.21 {} ';' &> /dev/null || true
• done on [root@web-b-prod]
✔ Ok [91ms]
➤ Executing task deploy:vendors
[root@web-a-prod] > export SYMFONY_ENV='prod'; if hash unzip 2>/dev/null; then echo 'true'; fi
[root@web-a-prod] < true
[root@web-a-prod] > export SYMFONY_ENV='prod'; if hash composer 2>/dev/null; then echo 'true'; fi
[root@web-a-prod] < true
[root@web-a-prod] > export SYMFONY_ENV='prod'; if hash command 2>/dev/null; then echo 'true'; fi
[root@web-a-prod] < true
[root@web-a-prod] > export SYMFONY_ENV='prod'; command -v 'composer'
[root@web-a-prod] < /usr/local/bin/composer
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && /usr/bin/php70 /usr/local/bin/composer install --verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader
[root@web-a-prod] < Do not run Composer as root/super user! See https://getcomposer.org/root for details
[root@web-a-prod] < Loading composer repositories with package information
[root@web-a-prod] < Installing dependencies from lock file
[root@web-a-prod] < Dependency resolution completed in 0.000 seconds
[root@web-a-prod] < Analyzed 109 packages to resolve dependencies
[root@web-a-prod] < Analyzed 236 rules to resolve dependencies
[root@web-a-prod] < Package operations: 51 installs, 0 updates, 0 removals
[root@web-a-prod] < Installs: doctrine/lexer:v1.0.1, doctrine/annotations:v1.2.7, doctrine/collections:v1.3.0, doctrine/inflector:v1.1.0, doctrine/cache:v1.6.2, doctrine/common:v2.6.2, doctrine/dbal:v2.5.13, twig/twig:v1.34.4, symfony/polyfill-util:v1.4.0, paragonie/random_compat:v2.0.10, symfony/polyfill-php70:v1.4.0, symfony/polyfill-php56:v1.4.0, symfony/polyfill-mbstring:v1.4.0, symfony/symfony:v3.3.6, symfony/polyfill-intl-icu:v1.4.0, psr/simple-cache:1.0.0, psr/log:1.0.2, psr/link:1.0.0, psr/container:1.0.0, psr/cache:1.0.1, fig/link-util:1.0.0, doctrine/doctrine-cache-bundle:1.3.0, doctrine/instantiator:1.0.5, willdurand/negotiation:v2.3.1, willdurand/jsonp-callback-validator:v1.1.0, friendsofsymfony/rest-bundle:2.2.0, friendsofsymfony/user-bundle:v2.0.1, psr/http-message:1.0.1, guzzlehttp/psr7:1.4.2, guzzlehttp/promises:v1.3.1, guzzlehttp/guzzle:6.3.0, incenteev/composer-parameter-handler:v2.1.2, twig/extensions:v1.5.1, sensio/framework-extra-bundle:v3.0.26, pagerfanta/pagerfanta:v1.0.5, doctrine/orm:v2.5.6, jdorn/sql-formatter:v1.2.17, doctrine/doctrine-bundle:1.6.8, javiereguiluz/easyadmin-bundle:v1.16.12, michelf/php-markdown:1.7.0, nelmio/api-doc-bundle:2.13.2, ramsey/uuid:3.7.0, composer/ca-bundle:1.0.7, sensiolabs/security-checker:v4.1.1, sensio/distribution-bundle:v5.0.20, monolog/monolog:1.23.0, symfony/monolog-bundle:v3.1.0, symfony/polyfill-apcu:v1.4.0, swiftmailer/swiftmailer:v5.4.8, symfony/swiftmailer-bundle:v2.6.3, white-october/pagerfanta-bundle:v1.0.8
[root@web-a-prod] <   - Installing doctrine/lexer (v1.0.1):
[root@web-a-prod] < Loading from cache
[root@web-a-prod] <  Extracting archive
[root@web-a-prod] <   - Installing doctrine/annotations (v1.2.7):
[root@web-a-prod] < Loading from cache
[...]
[root@web-a-prod] < Loading from cache
[root@web-a-prod] <  Extracting archive
[root@web-a-prod] < Generating optimized autoload files
[root@web-a-prod] < > post-install-cmd: @symfony-scripts
[root@web-a-prod] < > symfony-scripts: Incenteev\ParameterHandler\ScriptHandler::buildParameters
[root@web-a-prod] < Updating the "app/config/parameters.yml" file
[root@web-a-prod] < > symfony-scripts: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
[root@web-a-prod] < > symfony-scripts: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
[root@web-a-prod] <  // Clearing the cache for the prod environment with debug                      
[root@web-a-prod] <  // false
[root@web-a-prod] <  [OK] Cache for the "prod" environment (debug=false) was successfully cleared.
[root@web-a-prod] < > symfony-scripts: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets
[root@web-a-prod] <  Trying to install assets as relative symbolic links.
[root@web-a-prod] <  --- ------------------------------ ------------------ 
[root@web-a-prod] <       Bundle                         Method / Error    
[root@web-a-prod] <  --- ------------------------------ ------------------ 
[root@web-a-prod] <   ✔   EasyAdminBundle                relative symlink  
[root@web-a-prod] <   ✔   NelmioApiDocBundle             relative symlink
[root@web-a-prod] <   ✔   WhiteOctoberPagerfantaBundle   relative symlink  
[root@web-a-prod] <  --- ------------------------------ ------------------ 
[root@web-a-prod] <  [OK] All assets were successfully installed.
[root@web-a-prod] < > symfony-scripts: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile
[root@web-a-prod] < > symfony-scripts: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::prepareDeploymentTarget
• done on [root@web-a-prod]
[root@web-b-prod] > export SYMFONY_ENV='prod'; if hash unzip 2>/dev/null; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; if hash composer 2>/dev/null; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; if hash command 2>/dev/null; then echo 'true'; fi
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; command -v 'composer'
[root@web-b-prod] < /usr/local/bin/composer
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && /usr/bin/php70 /usr/local/bin/composer install --verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader
[root@web-b-prod] < Do not run Composer as root/super user! See https://getcomposer.org/root for details
[root@web-b-prod] < Loading composer repositories with package information
[root@web-b-prod] < Installing dependencies from lock file
[root@web-b-prod] < Dependency resolution completed in 0.001 seconds
[root@web-b-prod] < Analyzed 109 packages to resolve dependencies
[root@web-b-prod] < Analyzed 236 rules to resolve dependencies
[root@web-b-prod] < Package operations: 51 installs, 0 updates, 0 removals
[root@web-b-prod] < Installs: doctrine/lexer:v1.0.1, doctrine/annotations:v1.2.7, doctrine/collections:v1.3.0, doctrine/inflector:v1.1.0, doctrine/cache:v1.6.2, doctrine/common:v2.6.2, doctrine/dbal:v2.5.13, twig/twig:v1.34.4, symfony/polyfill-util:v1.4.0, paragonie/random_compat:v2.0.10, symfony/polyfill-php70:v1.4.0, symfony/polyfill-php56:v1.4.0, symfony/polyfill-mbstring:v1.4.0, symfony/symfony:v3.3.6, symfony/polyfill-intl-icu:v1.4.0, psr/simple-cache:1.0.0, psr/log:1.0.2, psr/link:1.0.0, psr/container:1.0.0, psr/cache:1.0.1, fig/link-util:1.0.0, doctrine/doctrine-cache-bundle:1.3.0, doctrine/instantiator:1.0.5, willdurand/negotiation:v2.3.1, willdurand/jsonp-callback-validator:v1.1.0, friendsofsymfony/rest-bundle:2.2.0, friendsofsymfony/user-bundle:v2.0.1, psr/http-message:1.0.1, guzzlehttp/psr7:1.4.2, guzzlehttp/promises:v1.3.1, guzzlehttp/guzzle:6.3.0, incenteev/composer-parameter-handler:v2.1.2, twig/extensions:v1.5.1, sensio/framework-extra-bundle:v3.0.26, pagerfanta/pagerfanta:v1.0.5, doctrine/orm:v2.5.6, jdorn/sql-formatter:v1.2.17, doctrine/doctrine-bundle:1.6.8, javiereguiluz/easyadmin-bundle:v1.16.12, michelf/php-markdown:1.7.0, nelmio/api-doc-bundle:2.13.2, ramsey/uuid:3.7.0, composer/ca-bundle:1.0.7, sensiolabs/security-checker:v4.1.1, sensio/distribution-bundle:v5.0.20, monolog/monolog:1.23.0, symfony/monolog-bundle:v3.1.0, symfony/polyfill-apcu:v1.4.0, swiftmailer/swiftmailer:v5.4.8, symfony/swiftmailer-bundle:v2.6.3, white-october/pagerfanta-bundle:v1.0.8
[root@web-b-prod] <   - Installing doctrine/lexer (v1.0.1):
[...]
[root@web-b-prod] < Loading from cache
[root@web-b-prod] <  Extracting archive
[root@web-b-prod] < Generating optimized autoload files
[root@web-b-prod] < > post-install-cmd: @symfony-scripts
[root@web-b-prod] < > symfony-scripts: Incenteev\ParameterHandler\ScriptHandler::buildParameters
[root@web-b-prod] < Updating the "app/config/parameters.yml" file
[root@web-b-prod] < > symfony-scripts: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
[root@web-b-prod] < > symfony-scripts: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
[root@web-b-prod] <  // Clearing the cache for the prod environment with debug                      
[root@web-b-prod] <  // false
[root@web-b-prod] <  [OK] Cache for the "prod" environment (debug=false) was successfully cleared.
[root@web-b-prod] < > symfony-scripts: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets
[root@web-b-prod] <  Trying to install assets as relative symbolic links.
[root@web-b-prod] <  --- ------------------------------ ------------------
[root@web-b-prod] <       Bundle                         Method / Error    
[root@web-b-prod] <  --- ------------------------------ ------------------
[root@web-b-prod] <   ✔   EasyAdminBundle                relative symlink
[root@web-b-prod] <   ✔   NelmioApiDocBundle             relative symlink  
[root@web-b-prod] <   ✔   WhiteOctoberPagerfantaBundle   relative symlink  
[root@web-b-prod] <  --- ------------------------------ ------------------
[root@web-b-prod] <  [OK] All assets were successfully installed.
[root@web-b-prod] < > symfony-scripts: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile
[root@web-b-prod] < > symfony-scripts: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::prepareDeploymentTarget
• done on [root@web-b-prod]
✔ Ok [10s 825ms]
➤ Executing task deploy:assets:install
[root@web-a-prod] > export SYMFONY_ENV='prod'; /usr/bin/php70 /home/www/html/php7/whv3/releases/1/bin/console assets:install --no-interaction --env=prod --no-debug /home/www/html/php7/whv3/releases/1/web
[root@web-a-prod] <  Installing assets as hard copies.
[root@web-a-prod] <  --- ------------------------------ ---------------- 
[root@web-a-prod] <       Bundle                         Method / Error  
[root@web-a-prod] <  --- ------------------------------ ----------------
[root@web-a-prod] <   ✔   EasyAdminBundle                copy            
[root@web-a-prod] <   ✔   NelmioApiDocBundle             copy
[root@web-a-prod] <   ✔   WhiteOctoberPagerfantaBundle   copy            
[root@web-a-prod] <  --- ------------------------------ ----------------
[root@web-a-prod] <  ! [NOTE] Some assets were installed via copy. If you make changes to these     
[root@web-a-prod] <  !        assets you have to run this command again.
[root@web-a-prod] <  [OK] All assets were successfully installed.
• done on [root@web-a-prod]
[root@web-b-prod] > export SYMFONY_ENV='prod'; /usr/bin/php70 /home/www/html/php7/whv3/releases/1/bin/console assets:install --no-interaction --env=prod --no-debug /home/www/html/php7/whv3/releases/1/web
[root@web-b-prod] <  Installing assets as hard copies.
[root@web-b-prod] <  --- ------------------------------ ----------------
[root@web-b-prod] <       Bundle                         Method / Error  
[root@web-b-prod] <  --- ------------------------------ ---------------- 
[root@web-b-prod] <   ✔   EasyAdminBundle                copy            
[root@web-b-prod] <   ✔   NelmioApiDocBundle             copy
[root@web-b-prod] <   ✔   WhiteOctoberPagerfantaBundle   copy            
[root@web-b-prod] <  --- ------------------------------ ----------------
[root@web-b-prod] <  ! [NOTE] Some assets were installed via copy. If you make changes to these     
[root@web-b-prod] <  !        assets you have to run this command again.
[root@web-b-prod] <  [OK] All assets were successfully installed.
• done on [root@web-b-prod]
✔ Ok [295ms]
➤ Executing task deploy:assetic:dump
• done on [root@web-a-prod]
• done on [root@web-b-prod]
✔ Ok [0ms]
➤ Executing task deploy:cache:clear
[root@web-a-prod] > export SYMFONY_ENV='prod'; /usr/bin/php70 /home/www/html/php7/whv3/releases/1/bin/console cache:clear --no-interaction --env=prod --no-debug --no-warmup
[root@web-a-prod] <  // Clearing the cache for the prod environment with debug                      
[root@web-a-prod] <  // false
[root@web-a-prod] <  [OK] Cache for the "prod" environment (debug=false) was successfully cleared.
• done on [root@web-a-prod]
[root@web-b-prod] > export SYMFONY_ENV='prod'; /usr/bin/php70 /home/www/html/php7/whv3/releases/1/bin/console cache:clear --no-interaction --env=prod --no-debug --no-warmup
[root@web-b-prod] <  // Clearing the cache for the prod environment with debug                      
[root@web-b-prod] <  // false
[root@web-b-prod] <  [OK] Cache for the "prod" environment (debug=false) was successfully cleared.
• done on [root@web-b-prod]
✔ Ok [265ms]
➤ Executing task deploy:cache:warmup
[root@web-a-prod] > export SYMFONY_ENV='prod'; /usr/bin/php70 /home/www/html/php7/whv3/releases/1/bin/console cache:warmup --no-interaction --env=prod --no-debug
[root@web-a-prod] <  // Warming up the cache for the prod environment with debug                    
[root@web-a-prod] <  // false
[root@web-a-prod] <  [OK] Cache for the "prod" environment (debug=false) was successfully warmed.
• done on [root@web-a-prod]
[root@web-b-prod] > export SYMFONY_ENV='prod'; /usr/bin/php70 /home/www/html/php7/whv3/releases/1/bin/console cache:warmup --no-interaction --env=prod --no-debug
[root@web-b-prod] <  // Warming up the cache for the prod environment with debug                    
[root@web-b-prod] <  // false
[root@web-b-prod] <  [OK] Cache for the "prod" environment (debug=false) was successfully warmed.
• done on [root@web-b-prod]
✔ Ok [4s 817ms]
➤ Executing task deploy:writable
[root@web-a-prod] > export SYMFONY_ENV='prod'; ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\  -f1
[root@web-a-prod] < apache
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (mkdir -p var/cache var/logs var/sessions var/oml var/oml/log var/oml/proccessed var/oml/to_proccess)
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (chmod 2>&1; true)
[root@web-a-prod] < chmod: missing operand
[root@web-a-prod] < Try `chmod --help' for more information.
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (if hash setfacl 2>/dev/null; then echo 'true'; fi)
[root@web-a-prod] < true
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (getfacl -p var/cache | grep "^user:apache:.*w" | wc -l)
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -RL -m u:"apache":rwX -m u:`whoami`:rwX var/cache)
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -dRL -m u:"apache":rwX -m u:`whoami`:rwX var/cache)
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (getfacl -p var/logs | grep "^user:apache:.*w" | wc -l)
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -RL -m u:"apache":rwX -m u:`whoami`:rwX var/logs)
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -dRL -m u:"apache":rwX -m u:`whoami`:rwX var/logs)
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (getfacl -p var/sessions | grep "^user:apache:.*w" | wc -l)
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -RL -m u:"apache":rwX -m u:`whoami`:rwX var/sessions)
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -dRL -m u:"apache":rwX -m u:`whoami`:rwX var/sessions)
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (getfacl -p var/oml | grep "^user:apache:.*w" | wc -l)
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -RL -m u:"apache":rwX -m u:`whoami`:rwX var/oml)
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -dRL -m u:"apache":rwX -m u:`whoami`:rwX var/oml)
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (getfacl -p var/oml/log | grep "^user:apache:.*w" | wc -l)
[root@web-a-prod] < 1
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (getfacl -p var/oml/proccessed | grep "^user:apache:.*w" | wc -l)
[root@web-a-prod] < 1
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (getfacl -p var/oml/to_proccess | grep "^user:apache:.*w" | wc -l)
[root@web-a-prod] < 1
• done on [root@web-a-prod]
[root@web-b-prod] > export SYMFONY_ENV='prod'; ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\  -f1
[root@web-b-prod] < apache
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (mkdir -p var/cache var/logs var/sessions var/oml var/oml/log var/oml/proccessed var/oml/to_proccess)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (chmod 2>&1; true)
[root@web-b-prod] < chmod: missing operand
[root@web-b-prod] < Try `chmod --help' for more information.
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (if hash setfacl 2>/dev/null; then echo 'true'; fi)
[root@web-b-prod] < true
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (getfacl -p var/cache | grep "^user:apache:.*w" | wc -l)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -RL -m u:"apache":rwX -m u:`whoami`:rwX var/cache)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -dRL -m u:"apache":rwX -m u:`whoami`:rwX var/cache)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (getfacl -p var/logs | grep "^user:apache:.*w" | wc -l)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -RL -m u:"apache":rwX -m u:`whoami`:rwX var/logs)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -dRL -m u:"apache":rwX -m u:`whoami`:rwX var/logs)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (getfacl -p var/sessions | grep "^user:apache:.*w" | wc -l)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -RL -m u:"apache":rwX -m u:`whoami`:rwX var/sessions)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -dRL -m u:"apache":rwX -m u:`whoami`:rwX var/sessions)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (getfacl -p var/oml | grep "^user:apache:.*w" | wc -l)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -RL -m u:"apache":rwX -m u:`whoami`:rwX var/oml)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (setfacl -dRL -m u:"apache":rwX -m u:`whoami`:rwX var/oml)
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (getfacl -p var/oml/log | grep "^user:apache:.*w" | wc -l)
[root@web-b-prod] < 1
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (getfacl -p var/oml/proccessed | grep "^user:apache:.*w" | wc -l)
[root@web-b-prod] < 1
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3/releases/1 && (getfacl -p var/oml/to_proccess | grep "^user:apache:.*w" | wc -l)
[root@web-b-prod] < 1
• done on [root@web-b-prod]
✔ Ok [1s 538ms]
➤ Executing task deploy:schema:update
[root@web-a-prod] > export SYMFONY_ENV='prod'; /usr/bin/php70 /home/www/html/php7/whv3/releases/1/bin/console doctrine:schema:update --force
[root@web-a-prod] < Nothing to update - your database is already in sync with the current entity metadata.
• done on [root@web-a-prod]
[root@web-b-prod] > export SYMFONY_ENV='prod'; /usr/bin/php70 /home/www/html/php7/whv3/releases/1/bin/console doctrine:schema:update --force
[root@web-b-prod] < Nothing to update - your database is already in sync with the current entity metadata.
• done on [root@web-b-prod]
✔ Ok [404ms]
➤ Executing task deploy:symlink
[root@web-a-prod] > export SYMFONY_ENV='prod'; if [[ $(man mv 2>&1 || mv -h 2>&1 || mv --help 2>&1) =~ '--no-target-directory' ]]; then echo 'true'; fi
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && ln -nfs /home/www/html/php7/whv3/releases/1 current
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && rm release
• done on [root@web-a-prod]
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [[ $(man mv 2>&1 || mv -h 2>&1 || mv --help 2>&1) =~ '--no-target-directory' ]]; then echo 'true'; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && ln -nfs /home/www/html/php7/whv3/releases/1 current
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && rm release
• done on [root@web-b-prod]
✔ Ok [293ms]
➤ Executing task deploy:unlock
[root@web-a-prod] > export SYMFONY_ENV='prod'; rm -f /home/www/html/php7/whv3/.dep/deploy.lock
• done on [root@web-a-prod]
[root@web-b-prod] > export SYMFONY_ENV='prod'; rm -f /home/www/html/php7/whv3/.dep/deploy.lock
• done on [root@web-b-prod]
✔ Ok [78ms]
➤ Executing task cleanup
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && if [ -e release ]; then  rm release; fi
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && if [ -h release ]; then  rm release; fi
• done on [root@web-a-prod]
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && if [ -e release ]; then  rm release; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && if [ -h release ]; then  rm release; fi
• done on [root@web-b-prod]
✔ Ok [153ms]
Successfully deployed!
antonmedv commented 7 years ago

Try running those command manually:

[root@web-a-prod] > export SYMFONY_ENV='prod'; if [[ $(man mv 2>&1 || mv -h 2>&1 || mv --help 2>&1) =~ '--no-target-directory' ]]; then echo 'true'; fi
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && ln -nfs /home/www/html/php7/whv3/releases/1 current
[root@web-a-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && rm release
• done on [root@web-a-prod]
[root@web-b-prod] > export SYMFONY_ENV='prod'; if [[ $(man mv 2>&1 || mv -h 2>&1 || mv --help 2>&1) =~ '--no-target-directory' ]]; then echo 'true'; fi
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && ln -nfs /home/www/html/php7/whv3/releases/1 current
[root@web-b-prod] > export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && rm release

Looks like here is problem - in one of commands

Toriniasty commented 7 years ago

I did two tests now: on web-a-prod where the structure looked like this:

12:01:34 root@web-a-prod:1:/home/www/html/php7/whv3:#> ls -l 
total 12
drwxr-xr-x 3 root root 4096 Sep 12 12:01 current
drwxr-xr-x 3 root root 4096 Sep 12 11:48 releases
drwxr-xr-x 4 root root 4096 Sep 12 11:48 shared

I have removed current directory, and executed 3 commands with the following output:

12:01:35 root@web-a-prod:0:/home/www/html/php7/whv3:#> rm -rf current
12:01:38 root@web-a-prod:0:/home/www/html/php7/whv3:#> ls -l 
total 8
drwxr-xr-x 3 root root 4096 Sep 12 11:48 releases
drwxr-xr-x 4 root root 4096 Sep 12 11:48 shared
12:01:39 root@web-a-prod:0:/home/www/html/php7/whv3:#> ls -l releases/
total 4
drwxr-xr-x 10 root root 4096 Sep 12 11:48 1
12:01:50 root@web-a-prod:0:/home/www/html/php7/whv3:#> export SYMFONY_ENV='prod'; if [[ $(man mv 2>&1 || mv -h 2>&1 || mv --help 2>&1) =~ '--no-target-directory' ]]; then echo 'true'; fi
12:01:53 root@web-a-prod:0:/home/www/html/php7/whv3:#> export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && ln -nfs /home/www/html/php7/whv3/releases/1 current
12:01:59 root@web-a-prod:0:/home/www/html/php7/whv3:#> ls -l 
total 8
lrwxrwxrwx 1 root root   35 Sep 12 12:01 current -> /home/www/html/php7/whv3/releases/1
drwxr-xr-x 3 root root 4096 Sep 12 11:48 releases
drwxr-xr-x 4 root root 4096 Sep 12 11:48 shared
12:02:03 root@web-a-prod:0:/home/www/html/php7/whv3:#> export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && rm release
rm: cannot remove `release': No such file or directory

On the web-b-prod node I haven't removed the directory and just left it like it was after first failed deployment:

12:05:12 root@web-b-prod:0:/home/www/html/php7/whv3:#> ls -l                                                                                                                                                       
total 12                                                                                                                                                                                                           
drwxr-xr-x. 3 root root 4096 Sep 12 11:48 current
drwxr-xr-x. 3 root root 4096 Sep 12 11:48 releases
drwxr-xr-x. 4 root root 4096 Sep 12 11:48 shared
12:05:13 root@web-b-prod:0:/home/www/html/php7/whv3:#> export SYMFONY_ENV='prod'; if [[ $(man mv 2>&1 || mv -h 2>&1 || mv --help 2>&1) =~ '--no-target-directory' ]]; then echo 'true'; fi
12:07:49 root@web-b-prod:0:/home/www/html/php7/whv3:#>  export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && ln -nfs /home/www/html/php7/whv3/releases/1 current
12:07:55 root@web-b-prod:0:/home/www/html/php7/whv3:#> export SYMFONY_ENV='prod'; cd /home/www/html/php7/whv3 && rm release
rm: cannot remove `release': No such file or directory
12:08:00 root@web-b-prod:1:/home/www/html/php7/whv3:#> ls -l 
total 12
drwxr-xr-x. 3 root root 4096 Sep 12 12:07 current
drwxr-xr-x. 3 root root 4096 Sep 12 11:48 releases
drwxr-xr-x. 4 root root 4096 Sep 12 11:48 shared
antonmedv commented 7 years ago

Why do you have drwxr-xr-x. 3 root root 4096 Sep 12 11:48 current current as directory?

Toriniasty commented 7 years ago

What do you mean? Why are there such permissions/user set? Or literally why the current is a directory?

If first, then to be fair it's just easier to us to deploy like that, not so critical piece of infrastructure. If second, I really don't know, that's why I've raised the bug :) (initial first deployment creates current directory instead of symlink, and creates symlink 1/ inside that directory)

antonmedv commented 7 years ago

Or literally why the current is a directory?

Do not create current dir - deployer will automatically create symlink.

Toriniasty commented 7 years ago

I didn't.... Deployer created it,that's what I'm trying to say. It does it during first deployment.

antonmedv commented 7 years ago

Really strange. Try to go one by one commands. Maybe we can find bug that way. And stop when dir is created.

Toriniasty commented 7 years ago

Indeed, what's even more strange now that it started to work as expected. The only change I can see and which could make it relevant is somebody upgraded php to a newer version,...

I really don't know what to do now, feel free to close if you want. And if I will find another host when the behavior will be the same, I'll just reopen.

Thanks

antonmedv commented 7 years ago

Let's close it to keep issues clear, if someone get same problems please open new issue.