Since quite some time nginx listens on (a) specific IP
address(es) instead of just listening on all interfaces (see
previous commit a225c3a15f3e6d0 AKA Change-Id: I42257d8b2a1eedf7433158477983cfc5f9c97315).
Because we didn't error out if SSH-ing fails or port 1443 isn't
in LISTEN state the script just checked until it ran into the
retry limit and then continued without failing. Instead let's
report this error to the Jenkins job/user by failing the run if
either SSH doesn't work or port 1443 isn't in LISTEN state.
While at it move the "retry" variable assignment in front
of the reporting, so we don't end it with "1 retries left"
and also get rid of `unnecessary on arithmetic variables`
in subshell (the $retry usage).
Change-Id: Ic7a4a39e460c4c81866c12b4b8b90c69f213538f
If e.g. the ngcp installation fails the ec2-ami-ce Jenkins job
fails to generate the ec2_report.txt file and then ec2-ami-stop
doesn't get the according information which instance ID should be
stopped, causing unnecessary instances still running.
Example run available at
https://jenkins.mgm.sipwise.com/job/ec2-ami-ce/85/consoleFull
with its downstream job
https://jenkins.mgm.sipwise.com/job/ec2-ami-stop/70/console ->
| 12:11:35 Copied 0 artifacts from "ec2-ami-ce" build number 85
| 12:11:35 ERROR: Failed to copy artifacts from ec2-ami-ce with filter: ec2_report.txt
Change-Id: I3a6a47c3fd2e19ef5a2e724451e8221bab4a8817
The ngcp-installer has failed, the error is:
> 2016-01-29 11:43:21: Executing sync-db:
> insert new rtp_interface ext=ext from config into db
> fatal: $HOME not set
> fatal: $HOME not set
It can be related to the new Jessie base AMI image we have switched,
the old one Wheezy AMI image has probably HOME defined.
While we are not sure here.
Change-Id: I3ab7dbb59f6081fb680c8447c18d29041a2f6563
We have added one more question for CE users in mr4.2:
> Do you want to proceed with replacing 'systemd' with 'sysv'? (y/N)
Which blocks ngcp-installer during AMI image creation.
Change-Id: Ib56dd8c7048837e01f27a8b39026b275ce4bf7f8
It fails if the AMIs are pending:
| Client.InvalidAMIID.Unavailable: The AMI ID '...' is currently pending and may not be used for this operation
and we don't want to block (yet).
Addressing:
| 15:26:25 + ec2-create-image --region eu-west-1 --name ngcp-ce-mr3.3.1.0+0~20140528091259.443+wheezy~1.gbpf74599 --description 'Official sip:provider CE AMI for release mr3.3.1.0+0~20140528091259.443+wheezy~1.gbpf74599 [2014-05-28_13:10]' i-b6b474f6
| 15:26:27 Client.InvalidAMIName.Malformed: AMI names must be between 3 and 128 characters long, and may contain letters, numbers, '(', ')', '.', '-', '/' and '_'
When deregistering an AMI the underlying snapshot used by the AMI
doesn't get removed automatically, so take care of it unless
--keep-ami-snapshot is set (which could be relevant when we
want to have a backup of the data of older AMIs).
This allows us to:
* more easily spot the instance IDs in the EC2 management console
* provide more restrictive IAM rules for e.g. "ec2:DeregisterImage"