Commit Graph

14 Commits

Author SHA1 Message Date
James E. Blair 8806e83383 Remove unused AWS implementation
These files have been replaced by adapter.py.

Change-Id: Ibbf0577f06a633183ce336ad5b322e10123bcdc0
2022-03-16 16:12:50 -07:00
Clark Boylan cd823105f4 Retry EC2 instance state GETs
Apparently if nodepool moves too quickly for EC2 we can get a
ClientError because the cloud doesn't know about the instance when we
get its state due to eventual consistency. Guard against this, sleep,
and retry in the existing retry loop for the instance to go running.

Story: 2009781
Change-Id: I581888a67e2401b85043c02876acd4df857e13b0
2022-01-13 12:22:31 -08:00
Albin Vass 0c84b7fa4e Add shell-type config
Ansible needs to know which shell type the node uses to operate
correctly, especially for ssh connections for windows nodes because
otherwise ansible defaults to trying bash.

Change-Id: I71abfefa57aaafd88f199be19ee7caa64efda538
2021-03-05 15:14:29 +01:00
Jonas Sticha d1a123111b
Replace call to deprecated Thread.isAlive
The isAlive() spelling is deprecated since python3.8,
and was remove in python3.9. The is_alive() spelling
of the method exists already since at least python2.7

Change-Id: I5d38aad85365dbc24451f032aac79e1b0de05a09
2020-12-18 12:20:09 +01:00
Benoit Bayszczak c50b6bbd55 [provider][aws] use one API call to create tags
Previously making 3 calls per intance's creation

Change-Id: I751c0dc4f17deb91ce521dd38cf6118b884ba3bb
2020-09-09 15:59:34 +02:00
Simon Westphahl 52709d7070 Pass node request handler to launcher base class
All implementations of the NodeLauncher have access to the node request
handler instance, but it was not passed through to the base class.

In order to initialize the event log adapter, the NodeLauncher will now
receive then node request handler instead of the Zookeeper connection.

The Zookeeper connection is directly extracted from the request handler.

Change-Id: I8ee7335f50b64435c82a5f039989f98750874466
2020-01-22 09:49:52 +01:00
Tobias Henkel 52f7d4fb62
Make public ip configurable in aws
When running nodepool against private cloud rooms it can be desirable
that the nodes don't get a public ip address. Let the user specify
this on pool level.

Change-Id: I3d636517837fd8a6593c12e4309372da5c062b06
2019-12-21 13:47:08 +01:00
Albin Vass ec9a532cdd 'keys' must be defined for host-key-checking: false
If host-key-checking is set to false the aws driver
fails with an UnboundLocalError

Change-Id: I91ec292a48e283f9fb8d60b944da8eaf1bec393b
2019-12-17 16:14:46 +01:00
Tristan Cacqueray 76aa62230c Add python-path option to node
This change adds a new python_path Node attribute so that zuul executor
can remove the default hard-coded ansible_python_interpreter.

Change-Id: Iddf2cc6b2df579636ec39b091edcfe85a4a4ed10
2019-05-07 02:22:45 +00:00
Zuul dd8ddec140 Merge "Gather host keys for connection-type network_cli" 2019-04-16 12:58:41 +00:00
Paul Belanger 3b893e3c28 Gather host keys for connection-type network_cli
The network_cli conneciton in ansible, is built a top of paramiko,
which then uses SSH at the transport. This means hosts using this
connection should also have their host keys collected.

Change-Id: I0383227374bdc1a9b0cecc255eabcb8a8d097b09
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-04-15 16:40:39 -04:00
Clint Byrum da21971e9b Implement max-servers for AWS driver
Max-servers has been ignored up until now. This implements the basic
checks so that AWS users can limit the number of instances they launch.

Change-Id: I73296bde1cdde80c52b6b5b725f268a17562060d
2019-04-11 18:12:12 -07:00
Clint Byrum b328c6de45 EC2: Do not tag an instance until it is running
Sometimes an instance stays as a reservation for a long time, sometimes
it's only a reservation for a split second. Before this change, the tag
would usually work, because the reservation turned to an instance fast
enough. But many times we've observed the instance conversion taking 5 -
10 seconds, and this is long enough that the tag operation fails, and
then nodepool loses track of the instance entirely.

Change-Id: Iaa5c230976625d8a5c5afd7970691e235f0f77f7
2019-02-04 08:48:27 -08:00
Tristan Cacqueray aa16b8b891 Amazon EC2 driver
This change adds an experimental AWS driver. It lacks some of the deeper
features of the openstack driver, such as quota management and image
building, but is highly functional for running tests on a static AMI.

Note that the test base had to be refactored to allow fixtures to be
customized in a more flexible way.

Change-Id: I313f9da435dfeb35591e37ad0bec921c8b5bc2b5
Co-Authored-By: Tristan Cacqueray <tdecacqu@redhat.com>
Co-Authored-By: David Moreau-Simard <dmsimard@redhat.com>
Co-AUthored-By: Clint Byrum <clint@fewbar.com>
2019-01-28 12:08:36 -08:00