{"action":"opened","issue":{"url":"https://api.github.com/repos/wphillipmoore/efs-core/issues/1","labels_url":"https://api.github.com/repos/wphillipmoore/efs-core/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/wphillipmoore/efs-core/issues/1/comments","events_url":"https://api.github.com/repos/wphillipmoore/efs-core/issues/1/events","html_url":"https://github.com/wphillipmoore/efs-core/issues/1","id":60675735,"number":1,"title":"Orphaned releasealiases can be created in prod cells","user":{"login":"wphillipmoore","id":3788880,"avatar_url":"https://avatars.githubusercontent.com/u/3788880?v=3","gravatar_id":"","url":"https://api.github.com/users/wphillipmoore","html_url":"https://github.com/wphillipmoore","followers_url":"https://api.github.com/users/wphillipmoore/followers","following_url":"https://api.github.com/users/wphillipmoore/following{/other_user}","gists_url":"https://api.github.com/users/wphillipmoore/gists{/gist_id}","starred_url":"https://api.github.com/users/wphillipmoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wphillipmoore/subscriptions","organizations_url":"https://api.github.com/users/wphillipmoore/orgs","repos_url":"https://api.github.com/users/wphillipmoore/repos","events_url":"https://api.github.com/users/wphillipmoore/events{/privacy}","received_events_url":"https://api.github.com/users/wphillipmoore/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-11T15:24:27Z","updated_at":"2015-03-11T15:24:27Z","closed_at":null,"body":"This is a subtle, and annoying bug.\r\n\r\nSo, this happened:\r\n\r\nremote: Successfully distributed releasealias efs/deploy-site/current to all cells        \r\nremote: Changed the state of efs/deploy-site/20150217-143519 from prod to deprecated        \r\nremote: The following releasealiases must be updated before this release        \r\nremote: can be destroyed.   In some remote cells, they still have targets        \r\nremote: that resolve to this release:        \r\nremote:         efs/deploy-site/current        \r\nremote: Test environment is up to date.        \r\nremote: Unable to destroy release 'efs/deploy-site/20150217-143519'        \r\nremote: Error running efs dist autorelease efs deploy-site        \r\n\r\nThis is because the older autorelease was disted to the prod cells (before I made that default to test, unless explicitly configured with an attribute).   Now, it only updated the current releasealias in the test cells, leaving a stale value in prod, which is what prevents that old release from being destroyed -- it has a releasealias still pointing at it (we check the diststate).\r\n\r\nHowever, went I tried to destroy the current releasealias to recreate it, it only destroyed it in the test cells, and ignored the links in prod.   Then, when I purged it, it stale symlinks in the prod cells were left behind.\r\n\r\nFirst, note that the error message above doesn't show the diststate of the stale releasealiases correctly, for one thing.  It only shows \"Test environment is up to date.\", but it's the prod environment that is the problem.   Second, destroy also ignores prod:\r\n\r\nefsops@nap8efst01$ efs destroy releasealias efs deploy-site current\r\nDestroyed releasealias efs/deploy-site/current -> 20150311-150620 in cell t.gs.geneva.emea.boot.efs\r\nDestroyed releasealias efs/deploy-site/current -> 20150311-150620 in cell t.nap8.nevada.amrs.boot.efs\r\nDestroyed 'efs/deploy-site/current' in /efs/stage.\r\nSuccessfully destroyed releasealias efs/deploy-site/current globally\r\n\r\nThis is serious, and subtle.   "}}