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 +4 -4
- data/lib/kitchen/driver/dokken.rb +30 -1
- data/lib/kitchen/driver/dokken_version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2c7f5b5652cdde267df1ead2dad29ea1c7e3f642cec4b86f3c5ef4c13612a3f3
|
|
4
|
+
data.tar.gz: 8b94c596b93899da42069d35faed37d4be565c9af5617839ee84f9e44fcc9a86
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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]
|