{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-codedeploy-agent/issues/185","repository_url":"https://api.github.com/repos/aws/aws-codedeploy-agent","labels_url":"https://api.github.com/repos/aws/aws-codedeploy-agent/issues/185/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-codedeploy-agent/issues/185/comments","events_url":"https://api.github.com/repos/aws/aws-codedeploy-agent/issues/185/events","html_url":"https://github.com/aws/aws-codedeploy-agent/issues/185","id":355317112,"node_id":"MDU6SXNzdWUzNTUzMTcxMTI=","number":185,"title":"Two deployments in the same directory: the second one fails","user":{"login":"tlacroix","id":4560307,"node_id":"MDQ6VXNlcjQ1NjAzMDc=","avatar_url":"https://avatars2.githubusercontent.com/u/4560307?v=4","gravatar_id":"","url":"https://api.github.com/users/tlacroix","html_url":"https://github.com/tlacroix","followers_url":"https://api.github.com/users/tlacroix/followers","following_url":"https://api.github.com/users/tlacroix/following{/other_user}","gists_url":"https://api.github.com/users/tlacroix/gists{/gist_id}","starred_url":"https://api.github.com/users/tlacroix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlacroix/subscriptions","organizations_url":"https://api.github.com/users/tlacroix/orgs","repos_url":"https://api.github.com/users/tlacroix/repos","events_url":"https://api.github.com/users/tlacroix/events{/privacy}","received_events_url":"https://api.github.com/users/tlacroix/received_events","type":"User","site_admin":false},"labels":[{"id":140573661,"node_id":"MDU6TGFiZWwxNDA1NzM2NjE=","url":"https://api.github.com/repos/aws/aws-codedeploy-agent/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-08-29T20:18:48Z","updated_at":"2018-12-04T21:46:40Z","closed_at":null,"author_association":"NONE","body":"We are using Ubuntu 18.04, and are cloning the github repository's `master` branch.\r\n\r\nWe currently have two deployments in two separate directories:\r\n- `/var/www/api`\r\n- `/var/www/angular`\r\n\r\nWe can't seem to be able to deploy both in `/var/www` with the new version of the agent, while it works fine with the previous one.\r\n\r\nThe deployment will fail during the install stage after less than a second if /var/www is not completely empty.\r\n\r\nThe error code it returns is: `Unknown error,   \r\nDirectory not empty @ dir_s_rmdir - /var/www`\r\n\r\nWe were previously using Ubuntu 16.04 with the CodeDeploy agent located here: s3://aws-codedeploy-us-east-1/latest/install -- and it works fine with two deployment in `/var/www`.\r\n\r\nVersion `v1.0-1518` on github seems to work properly on Ubutun 18.04, and we can deploy both applications in `/var/www`. We only really have this problem with the `master` branch.\r\n\r\nOur environment is pretty standard (Vanilla Ubuntu 18.04, with a few standard packages installed, such as nginx, php7.2-fpm, etc.)\r\n\r\nSteps to reproduce:\r\n- Deploy api: success\r\n- Deploy angular: error\r\n- Deploy angular: error\r\n- Delete /var/www\r\n- Deploy angular: success\r\n- Deploy api: error\r\n- Deploy api: error\r\n\r\nOur `appspec.yml` goes as follow (it's the same for the angular project, but with `/var/www/angular` instead):\r\n\r\n```\r\n# http://docs.aws.amazon.com/codedeploy/latest/userguide/app-spec-ref.html\r\n\r\nversion: 0.0\r\n\r\nos: linux\r\n\r\nfiles:\r\n   - source: /\r\n     destination: /var/www/api\r\n\r\npermissions:\r\n  - object: /var/www/api\r\n    pattern: \"**\"\r\n    owner: root\r\n    group: www-data\r\n    mode: 775\r\n    type:\r\n      - directory\r\n  - object: /var/www/api\r\n    pattern: \"**\"\r\n    owner: root\r\n    group: www-data\r\n    mode: 664\r\n    type:\r\n      - file\r\n```"},"comment":{"url":"https://api.github.com/repos/aws/aws-codedeploy-agent/issues/comments/444271164","html_url":"https://github.com/aws/aws-codedeploy-agent/issues/185#issuecomment-444271164","issue_url":"https://api.github.com/repos/aws/aws-codedeploy-agent/issues/185","id":444271164,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NDI3MTE2NA==","user":{"login":"joshdutcher","id":1928341,"node_id":"MDQ6VXNlcjE5MjgzNDE=","avatar_url":"https://avatars1.githubusercontent.com/u/1928341?v=4","gravatar_id":"","url":"https://api.github.com/users/joshdutcher","html_url":"https://github.com/joshdutcher","followers_url":"https://api.github.com/users/joshdutcher/followers","following_url":"https://api.github.com/users/joshdutcher/following{/other_user}","gists_url":"https://api.github.com/users/joshdutcher/gists{/gist_id}","starred_url":"https://api.github.com/users/joshdutcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshdutcher/subscriptions","organizations_url":"https://api.github.com/users/joshdutcher/orgs","repos_url":"https://api.github.com/users/joshdutcher/repos","events_url":"https://api.github.com/users/joshdutcher/events{/privacy}","received_events_url":"https://api.github.com/users/joshdutcher/received_events","type":"User","site_admin":false},"created_at":"2018-12-04T21:46:40Z","updated_at":"2018-12-04T21:46:40Z","author_association":"NONE","body":"Same problem here. CodeDeploy is not removing the `vendor` folder in my php application which is throwing the same error."}}
{"actor":{"display_login":"joshdutcher"}}