{"action":"created","issue":{"url":"https://api.github.com/repos/juju/juju/issues/8442","repository_url":"https://api.github.com/repos/juju/juju","labels_url":"https://api.github.com/repos/juju/juju/issues/8442/labels{/name}","comments_url":"https://api.github.com/repos/juju/juju/issues/8442/comments","events_url":"https://api.github.com/repos/juju/juju/issues/8442/events","html_url":"https://github.com/juju/juju/pull/8442","id":301384069,"node_id":"MDExOlB1bGxSZXF1ZXN0MTcyMjIxMjg3","number":8442,"title":"Add plug collection","user":{"login":"gabriel-samfira","id":903160,"node_id":"MDQ6VXNlcjkwMzE2MA==","avatar_url":"https://avatars3.githubusercontent.com/u/903160?v=4","gravatar_id":"","url":"https://api.github.com/users/gabriel-samfira","html_url":"https://github.com/gabriel-samfira","followers_url":"https://api.github.com/users/gabriel-samfira/followers","following_url":"https://api.github.com/users/gabriel-samfira/following{/other_user}","gists_url":"https://api.github.com/users/gabriel-samfira/gists{/gist_id}","starred_url":"https://api.github.com/users/gabriel-samfira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabriel-samfira/subscriptions","organizations_url":"https://api.github.com/users/gabriel-samfira/orgs","repos_url":"https://api.github.com/users/gabriel-samfira/repos","events_url":"https://api.github.com/users/gabriel-samfira/events{/privacy}","received_events_url":"https://api.github.com/users/gabriel-samfira/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-03-01T12:18:47Z","updated_at":"2018-09-25T03:57:45Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/juju/juju/pulls/8442","html_url":"https://github.com/juju/juju/pull/8442","diff_url":"https://github.com/juju/juju/pull/8442.diff","patch_url":"https://github.com/juju/juju/pull/8442.patch"},"body":"This PR adds the ability for providers to consume storage that requires the target machine agent to initialize the storage before it becomes available locally.\r\n\r\nOne such example is ```iSCSI```, which at the moment is the only type of attachable storage in the Oracle OCI cloud (former Bare Metal Cloud - bmcs).\r\n\r\nThe OCI cloud allows creating volumes, and attaching them to instances, but there is still a need to log into the iscsi target using the connection info and credentials returned as part of the GetAttachment() API call. There is no agent inside the instances that does this automatically, so it is left up to the juju machine agent to run those commands.\r\n\r\nThis change adds a new collection in the database called ```volumeattachmentplug``` which is watched by machine agents, and which prompts the machine agent, to fetch the volume plug info set by the provider during volume creation/attachment, and do any initialization needed.\r\n\r\nAfter the machine agent finishes initializing the volume attachment connection, it will send back the block device information relevant to that attachment (device name, WWN, serial number, etc). This means that the cloud provider code does not need to set the device name. It is automatically discovered by the storage plug.\r\n\r\nThis change should *not* require an update in any of the other providers. The lack of \"plug info\" should just be a noop for the other providers. Also, it should not require any upgrade steps for existing environments. The lack of a \"storage plug\" will simply mean that the old code path is used.\r\n\r\nThis change means that any provider can use external storage sources like iSCSI/Ceph that require some extra steps to be run on the machine itself before being able to access the block device.\r\n\r\n**NOTE**: depends on: https://github.com/juju/description/pull/41\r\n\r\nQA steps:\r\n\r\nOn OCI:\r\n\r\n- Boostrap new controller: SUCCESS\r\n- deploy workload with storage attachment: SUCCESS\r\n- detach storage from unit: SUCCESS\r\n- re-attach storage to unit: SUCCESS\r\n\r\nOn AWS:\r\n- Boostrap new controller: SUCCESS\r\n- deploy workload with storage attachment: SUCCESS\r\n- detach storage from unit: SUCCESS\r\n- re-attach storage to unit: SUCCESS"},"comment":{"url":"https://api.github.com/repos/juju/juju/issues/comments/424199612","html_url":"https://github.com/juju/juju/pull/8442#issuecomment-424199612","issue_url":"https://api.github.com/repos/juju/juju/issues/8442","id":424199612,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNDE5OTYxMg==","user":{"login":"jameinel","id":202877,"node_id":"MDQ6VXNlcjIwMjg3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/202877?v=4","gravatar_id":"","url":"https://api.github.com/users/jameinel","html_url":"https://github.com/jameinel","followers_url":"https://api.github.com/users/jameinel/followers","following_url":"https://api.github.com/users/jameinel/following{/other_user}","gists_url":"https://api.github.com/users/jameinel/gists{/gist_id}","starred_url":"https://api.github.com/users/jameinel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jameinel/subscriptions","organizations_url":"https://api.github.com/users/jameinel/orgs","repos_url":"https://api.github.com/users/jameinel/repos","events_url":"https://api.github.com/users/jameinel/events{/privacy}","received_events_url":"https://api.github.com/users/jameinel/received_events","type":"User","site_admin":false},"created_at":"2018-09-25T03:57:45Z","updated_at":"2018-09-25T03:57:45Z","author_association":"MEMBER","body":"!!build!!"}}
{"actor":{"display_login":"jameinel"}}