kitchen-dokken 2.23.5 → 2.23.6

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: ed64ab202db24ce243e1a4c26083a924b194aec6a3cc448c88de450d6e53e091
4
- data.tar.gz: d252f250ec7bc1af41500443d3c2edf295b622d0222467fc9a1bb1edc552b065
3
+ metadata.gz: 2c7f5b5652cdde267df1ead2dad29ea1c7e3f642cec4b86f3c5ef4c13612a3f3
4
+ data.tar.gz: 8b94c596b93899da42069d35faed37d4be565c9af5617839ee84f9e44fcc9a86
5
5
  SHA512:
6
- metadata.gz: df9c8ca5f29d747dc3e4838338f793e46cc4ea3138db6fbd9f4cd65ce0a94cbf3a2a62a0417fd312b399258d378bd046d6659a55fcc982264a6908587ccee049
7
- data.tar.gz: dd0477b6314e4ae2efc3b529b77cad5408493b157bd49471205edfdc5a6eaf464feb51a12928259195c80ce14c65d22e39a13c017e7de0105569e02606e8c858
6
+ metadata.gz: d48c19a4bdbed503978b68451cded18f2437d2aa0c048d8285344447c4a27503b48937eaf29d93d2fd429316f9c8db240942f09a3333616c939a5cd58555f26d
7
+ data.tar.gz: 305e81615cc269fdfc685436bbd19b47de69c465006c8ac7b55b42eb8911e4dbfd3e2b36759417347e109c56418176dfa69b5f5136f33669ff2b3e5ffbed4f62
@@ -543,7 +543,8 @@ module Kitchen
543
543
  return unless self[:network_mode] == "dokken"
544
544
 
545
545
  with_file_lock("#{home_dir}/.dokken-network.lock") do
546
- with_retries { ::Docker::Network.get("dokken", {}, docker_connection) }
546
+ network = with_retries { ::Docker::Network.get("dokken", {}, docker_connection) }
547
+ warn_on_ipv6_mismatch(network)
547
548
  rescue ::Docker::Error::NotFoundError
548
549
  begin
549
550
  with_retries { ::Docker::Network.create("dokken", network_settings) }
@@ -553,6 +554,34 @@ module Kitchen
553
554
  end
554
555
  end
555
556
 
557
+ # Say something when the shared network cannot honour `ipv6: true`.
558
+ #
559
+ # The dokken network is created once and shared by every instance, and
560
+ # `destroy` deliberately leaves it behind -- so on any workstation that
561
+ # has run a non-ipv6 suite, it already exists without ipv6. Since the
562
+ # network is only created when absent, a later `ipv6: true` suite
563
+ # quietly reuses it, the container gets no ipv6 address, and nothing
564
+ # anywhere says why.
565
+ #
566
+ # Deliberately a warning rather than an error: the network may be in use
567
+ # by other instances right now, and removing it is the user's call.
568
+ #
569
+ # @param network [::Docker::Network] the existing dokken network
570
+ # @return [void]
571
+ def warn_on_ipv6_mismatch(network)
572
+ return unless self[:ipv6]
573
+
574
+ # A daemon that does not report the flag must not produce a warning on
575
+ # every converge.
576
+ enabled = network.info["EnableIPv6"] if network.respond_to?(:info)
577
+ return if enabled.nil? || enabled
578
+
579
+ warn "The existing dokken network was created without IPv6, so `ipv6: true` " \
580
+ "will have no effect and this instance will get no IPv6 address. The " \
581
+ "network is shared and `kitchen destroy` leaves it in place; recreate it " \
582
+ "with `docker network rm dokken` once no containers are using it."
583
+ end
584
+
556
585
  # Build the data image, unless it is already present.
557
586
  #
558
587
  # @return [void]
@@ -18,6 +18,6 @@
18
18
  module Kitchen
19
19
  module Driver
20
20
  # Version string for Dokken Kitchen driver
21
- DOKKEN_VERSION = "2.23.5".freeze
21
+ DOKKEN_VERSION = "2.23.6".freeze
22
22
  end
23
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-dokken
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.23.5
4
+ version: 2.23.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean OMeara