Commit graph

529 commits

Author SHA1 Message Date
d1c86eaf9b
Move vsphere provider to its own gem 2021-11-29 16:09:15 -05:00
Jenkins
48c5d6d445 (GEM) update vmpooler version to 1.3.0 2021-11-15 15:57:33 +00:00
a0caa41a54
(DIO-2675) Undo pool size template overrides
This implements a delete method for pooltemplate and poolsize. The API
removes the override from Redis and then adds an entry in Redis that
causes the pool manager to wake up and process the removal of the
override.

To facilitate this, a new variable has been created in lib/vmpooler.rb
to hold a copy of the original / pre-override config. This supplemental
copy of the pools is then indexed for use as a reference.

When pool manager wakes up to process an override removal, it looks up
the pre-override value from the config via the new variables mentioned
above.

Just as with entering overrides, no restart is needed. Template and pool
size changes are logged so that anyone watching or reviewing the logs
can see what happened when. The new API endpoints also return values for
both the pre-revert and post-revert value.
2021-11-04 14:03:06 -04:00
Jenkins
f6eb636dff (GEM) update vmpooler version to 1.2.0 2021-09-15 13:54:19 +00:00
5cd7658ab4
(DIO-2621) Make LDAP encryption configurable
Prior to this, the encryption settings for LDAP auth were hard coded to
start_tls on port 389 with TLSv1. These are still the defaults, as
insecure as they are, so as to not break existing users. This change
facilitates replacing the defaults so that simple_tls over port 636 via
TLS1.2 can be used.
2021-09-14 16:35:32 -04:00
Jenkins
5f0d41412c (GEM) update vmpooler version to 1.1.2 2021-08-25 15:04:35 +00:00
Jake Spain
c88f5d8b5a
Fix missing function when moving metrics from pool_manager to api/v1
Fix dependency function component_to_test for jenkins metrics that was not copied from pool_manager to api/v1 in https://github.com/puppetlabs/vmpooler/pull/455
2021-08-25 09:27:45 -04:00
Jake Spain
a28d142f50
Fix user metric so that poolnames with a dot are replaced by underscore 2021-08-25 08:27:30 -04:00
Jenkins
45662e4d2a (GEM) update vmpooler version to 1.1.1 2021-08-24 13:16:46 +00:00
Jake Spain
c541617452
Bump otel gems to 0.17.0 and address breaking changes 2021-08-23 12:16:45 -04:00
Jenkins
771c5b721a (GEM) update vmpooler version to 1.1.0 2021-08-18 12:05:25 +00:00
Jake Spain
c06cfc28f7
Add operation label to user metric and move from manager to api
This adds an "operation" label to the user metrics and moves incrementing from the manager to api, so that the user metrics show when resources are allocated, as well as destroyed. Previously, user metrics were only updated upon destroying a resource.

I think its better suited to increment the metric as part of the api instead of the pool_manger, because it's expected to do so when a user successfully checks out or deletes a VM, but can be problematic when doing so in the provider since it can clone VMs before actually being checked out by a user.
2021-08-13 11:23:10 -04:00
Jenkins
9984a274b5 (GEM) update vmpooler version to 1.0.0 2021-02-02 17:05:29 +00:00
8e9d8ee51e
Update OTel gems to 0.13.z 2021-02-02 11:25:26 -05:00
7a1fc24685
Fix regex for ondemand instances
It appears we renamed `/ondemand/` to `/ondemandvm/` at some point and,
as a result, have not been stripping hostnames from that endpoint's
metrics. This has caused issues with metrics collection due a very high
cardinality.
2021-02-02 11:11:17 -05:00
Jenkins
eddca1c67d (GEM) update vmpooler version to 0.18.2 2020-11-10 21:07:51 +00:00
Belén
65495fc2ee
Merge branch 'master' into pooler_193_2 2020-11-10 11:46:12 -08:00
kirby@puppetlabs.com
7ff23a386d Remove usage of redis multi from api
This change removes usage of redis multi from API. Without this change the redis usage can cause issues because no connection pool is used, so another worker may try to use the same backend object causing a failure.
2020-11-10 11:38:14 -08:00
John O'Connor
a407d2329d (MAINT) Fix checkout counter allocation
Checkout metric counters were against the template name and not the
actual pool used which prevents us from counting the checkouts in the
pixa4 pools for example.

Note - this is a re-rerun - the last commit on this file over-wrote
the change.
2020-11-10 19:13:24 +00:00
Jenkins
55e45bcbe5 (GEM) update vmpooler version to 0.18.1 2020-11-10 18:04:50 +00:00
kirby@puppetlabs.com
21bf9dbc1c Fix syntax of validate_token in helpers
This change fixes an error in validate_token where hset does not have the correct number of parameters. Without this change validate_token causes a error.
2020-11-09 11:05:58 -08:00
kirby@puppetlabs.com
cfd6a5f991 (POOLER-193) Mark checked out VM as active
This change sets a VM as running in redis as soon as it is checked out. Without this change when allocated several instances it is possible for a machine that has been allocated for a checkout, but not yet marked as active, to be identified as running when it should not be, which was added in POOLER-191. Without this change a machine may be destroyed during checkout by pool_manager if there are several instances being allocated.

Additionally, redis multi is added for vm checkout operations to minimize the round trips to redis during a checkout operation. Without this addition each VM checkout causes several redis interactions.
2020-11-09 11:05:56 -08:00
John O'Connor
11bda0f31a (MAINT) Fix checkout counter allocation
Checkout metric counters were against the template name and not the
actual pool used which prevents us from counting the checkouts in the
pixa4 pools for example.
2020-11-06 20:46:11 +00:00
Belén
7f3d867b5c
Merge branch 'master' into pooler-192 2020-10-26 11:34:13 -07:00
Belen Bustamante
474aba379c Rubocop fix 2020-10-26 10:25:54 -07:00
Jenkins
32e9b6c330 (GEM) update vmpooler version to 0.18.0 2020-10-26 16:26:29 +00:00
Belen Bustamante
2a6d610b7a Rubocop fix 2020-10-23 17:41:02 -07:00
Samuel
0a323f6052
(maint) Speedup the tagging method (#422)
* (maint) Speedup the tagging method
While looking at the instrumentation data for the ABS queue processor,
I noticed a lot of time spent in the HTTP PUT method, which in the code
was easy to isolate, as it is only used via the vmpooler tagging functions
ie the API /vm/foobar/ with 'tag' key-value pairs.
While I'm not sure the original hset() make sense to me, there was an easy
way to speed them up by using pipelined. I would expect a very good speed
increase with this turned on.

* tag rubocop to <1.0 because the 1.0 version returns 130 new offenses
2020-10-23 09:40:11 -07:00
Jenkins
981d110bbf (GEM) update vmpooler version to 0.17.0 2020-10-20 15:27:00 +00:00
suckatrash
b2ac53fa76
(DIO-1059) Optionally add snapshot tuning params at clone time 2020-10-16 16:29:29 -07:00
Jenkins
a42ed6cb5d (GEM) update vmpooler version to 0.16.3 2020-10-14 19:26:09 +00:00
kirby@puppetlabs.com
0ad069b958 (POOLER-191) Add checking for running instances that are not in active
This change adds detection of running instances that are in a running
queue, but have no data in a active queue for the same pool. When this
happens a machine will live forever, impacting the running count, and
preventing the machine from being killed. Without this change running
instances that are not marked as active will live forever.
2020-10-13 14:17:51 -07:00
Jenkins
35104a75bb (GEM) update vmpooler version to 0.16.2 2020-10-08 22:44:29 +00:00
Jenkins
a8bdfc1647 (GEM) update vmpooler version to 0.16.1 2020-10-08 19:06:50 +00:00
Jenkins
ccdf8a4ccb (GEM) update vmpooler version to 0.16.0 2020-10-08 19:02:28 +00:00
f5698d49fc
Update to OTel 0.7.0
This update includes two key benefits:

1. Spans will be named based on their route instead of the full path
   info thanks to https://github.com/open-telemetry/opentelemetry-ruby/pull/415
2. Helper methods were added to the configurator to simplify setting
   service.name and service.version
2020-10-08 09:49:45 -04:00
Jenkins
4e7e16e001 (GEM) update vmpooler version to 0.15.0 2020-09-30 20:12:39 +00:00
Belen Bustamante
08132f75bd
Add healthcheck endpoint, spec testing 2020-09-22 12:25:26 -07:00
Jenkins
4d06c01d21 (GEM) update vmpooler version to 0.14.9 2020-09-21 17:45:43 +00:00
Jenkins
b484cc5992 (GEM) update vmpooler version to 0.14.8 2020-09-18 19:05:23 +00:00
Jenkins
c49a94a819 (GEM) update vmpooler version to 0.14.7 2020-09-18 16:07:03 +00:00
214f01c501
Add OTel resource detecors
Adding this should allow OpenTelemetry to detect information about our
Kubernetes environment.
2020-09-17 21:11:07 -04:00
8f3039e321
Add distributed tracing (#399)
This change utilizes OpenTelemetry's automatic instrumentation to add
distributed tracing capabilities to VMPooler. This is a non-breaking
change as traces are processed in noop mode by default.
2020-09-17 15:35:21 -04:00
Jenkins
8dda72ebb3 (GEM) update vmpooler version to 0.14.6 2020-09-17 15:14:18 +00:00
Samuel Beaulieu
1c53625fd8 add the default in the standard location, also adding
support for an ENV var. Update the example yaml file with the new config
2020-09-03 08:49:45 -05:00
Samuel Beaulieu
a35d66c606 (POOLER-184) Pool manager retry and exit on failure
Adding a reconnect retry for redis, which by default would retry 10 times,
for a total wait time of ~80 seconds
2020-09-02 11:38:40 -05:00
Belen Bustamante
07d1ca2b2c Add promstats component check 2020-08-29 09:40:29 -07:00
Jenkins
d47df61c19 (GEM) update vmpooler version to 0.14.5 2020-08-21 18:15:48 +00:00
f8c64b4006
Merge pull request #396 from jcoconnor/MAINT-Fix-Staledns-count
(MAINT) Fix Staledns error counter
2020-08-21 14:13:24 -04:00
John O'Connor
18988ddc3c (MAINT) Fix Staledns error counter
This was logging the hostname instead of the poolname.
2020-08-21 19:03:19 +01:00