kitchen-dokken 2.11.1 → 2.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 98524d476ee9044dfb093ab3de13152ac564103fa663d8d50bdf0393d9bfcf32
4
- data.tar.gz: 653e8898c6d4cc114edc2dd4d1229744d0fea01745c4a45dfac1e49ada5127e5
3
+ metadata.gz: ef0d3aea1c2839a2674ed7986dba589c8e672a19a600bdf9173689d286414160
4
+ data.tar.gz: ad29a7651abca534ff753140b67408adfa5e7a8c44252b810925a68f1ac2ca88
5
5
  SHA512:
6
- metadata.gz: 751bf6a56a04c4eaa040cdc0a527d9a0b9202534107d16563af52986b57285337be29cb89203828135f2bf373afad8e4413580a837398e0964c89eff9c6defed
7
- data.tar.gz: 3828997c2805eb7b2f1d433643c32ceef797a82a1a7d20649c6309c8cc760c965a4bc8c9222fc8fa5956c84657b53040cd26ed86bfdd065303dcdd4d3aa0bcb2
6
+ metadata.gz: e5056e47e61cd05b666a4058a0eaee09a4fa4907d331088f92ff783c41bd455cc33424ca25ac885b278270c4f8d8ebdc80cf5734d3b7363da6c4d34e1f2e74de
7
+ data.tar.gz: 50bec0744f44a44603dc887c99b3c73009eebe9c02f2832c10aecfa02bc46cea55c19d591d3d08efc409907a80139626bbf356aafbf73017872e607d65c857c9
@@ -153,9 +153,9 @@ module Kitchen
153
153
  rescue Docker::Error::UnexpectedResponseError => e
154
154
  msg = 'work_image build failed: '
155
155
  msg += JSON.parse(e.to_s.split("\r\n").last)['error'].to_s
156
- msg += '. The common scenerios are incorrect intermediate'
156
+ msg += '. The common scenarios are incorrect intermediate '
157
157
  msg += 'instructions such as not including `-y` on an `apt-get` '
158
- msg += 'or similar. The other common scenerio is a transient '
158
+ msg += 'or similar. The other common scenario is a transient '
159
159
  msg += 'error such as an unresponsive mirror.'
160
160
  raise msg
161
161
  # fallback rescue above should catch most of the errors
@@ -368,8 +368,16 @@ module Kitchen
368
368
  lockfile = Lockfile.new "#{home_dir}/.dokken-#{chef_container_name}.lock"
369
369
  begin
370
370
  lockfile.lock
371
- with_retries { ::Docker::Container.get(chef_container_name, {}, docker_connection) }
371
+ with_retries {
372
+ # TEMPORARY FIX - docker-api 2.0.0 has a buggy Docker::Container.get - use .all instead
373
+ # https://github.com/swipely/docker-api/issues/566
374
+ # ::Docker::Container.get(chef_container_name, {}, docker_connection)
375
+ found = ::Docker::Container.all({all: true}, docker_connection).select { |c| c.info["Names"].include?("/#{chef_container_name}") }
376
+ raise ::Docker::Error::NotFoundError.new(chef_container_name) if found.empty?
377
+ debug "Chef container already exists, continuing"
378
+ }
372
379
  rescue ::Docker::Error::NotFoundError
380
+ debug "Chef container does not exist, creating a new Chef container"
373
381
  with_retries do
374
382
  begin
375
383
  debug "driver - creating volume container #{chef_container_name} from #{chef_image}"
@@ -18,6 +18,6 @@
18
18
  module Kitchen
19
19
  module Driver
20
20
  # Version string for Dokken Kitchen driver
21
- DOKKEN_VERSION = '2.11.1'.freeze
21
+ DOKKEN_VERSION = '2.11.2'.freeze
22
22
  end
23
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-dokken
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.1
4
+ version: 2.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean OMeara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-19 00:00:00.000000000 Z
11
+ date: 2020-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docker-api