environs/manual has been further refactored to
split the "manual cloud-init over SSH" out into
a separate package (cloudinit/sshinit).
provider/common now starts an instance with the
basic cloud-init only (SSH keys + logging), then
waits for a DNS name, waits to be able to connect
via SSH, and then defers to sshinit to execute the
remaining cloud-init steps.
If the user hits Ctrl-C, SIGINT will terminate
the SSH connection, and the bootstrap process will
attempt to clean up by stopping the instance and
removing the state file (if the instance could be
cleanly stopped). We also ignore SIGINT in the
juju process so a second Ctrl-C will not terminate
the cleanup procedure.
Affected files (+334, -88 lines):
A [revision details]
M cloudinit/options.go
M cloudinit/sshinit/configure.go
M cloudinit/sshinit/configure_test.go
A cloudinit/sshinit/suite_test.go
M cmd/juju/bootstrap.go
M environs/bootstrap/state.go
M environs/bootstrap/state_test.go
M environs/cloudinit.go
M environs/cloudinit/cloudinit.go
M environs/cloudinit_test.go
M environs/manual/bootstrap.go
M environs/manual/detection.go
M environs/manual/provisioner.go
M provider/common/bootstrap.go
M provider/common/bootstrap_test.go
M provider/ec2/local_test.go
M provider/maas/maas_test.go
M provider/openstack/local_test.go
M utils/ssh/ssh.go
Reviewers: mp+196058_ code.launchpad. net,
Message:
Please take a look.
Description:
Implement synchronous bootstrap
environs/manual has been further refactored to sshinit) .
split the "manual cloud-init over SSH" out into
a separate package (cloudinit/
provider/common now starts an instance with the
basic cloud-init only (SSH keys + logging), then
waits for a DNS name, waits to be able to connect
via SSH, and then defers to sshinit to execute the
remaining cloud-init steps.
If the user hits Ctrl-C, SIGINT will terminate
the SSH connection, and the bootstrap process will
attempt to clean up by stopping the instance and
removing the state file (if the instance could be
cleanly stopped). We also ignore SIGINT in the
juju process so a second Ctrl-C will not terminate
the cleanup procedure.
Fixes #1224230
https:/ /code.launchpad .net/~axwalk/ juju-core/ synchronous- bootstrap/ +merge/ 196058
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/30190043/
Affected files (+334, -88 lines): options. go sshinit/ configure. go sshinit/ configure_ test.go sshinit/ suite_test. go bootstrap. go bootstrap/ state.go bootstrap/ state_test. go cloudinit. go cloudinit/ cloudinit. go cloudinit_ test.go manual/ bootstrap. go manual/ detection. go manual/ provisioner. go common/ bootstrap. go common/ bootstrap_ test.go ec2/local_ test.go maas/maas_ test.go openstack/ local_test. go
A [revision details]
M cloudinit/
M cloudinit/
M cloudinit/
A cloudinit/
M cmd/juju/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M provider/
M provider/
M provider/
M provider/
M provider/
M utils/ssh/ssh.go