vagrant-zones 0.1.96 → 0.1.98
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/CHANGELOG.md +21 -0
- data/lib/vagrant-zones/action.rb +12 -3
- data/lib/vagrant-zones/driver.rb +33 -19
- data/lib/vagrant-zones/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d8030de6b60c644966b08811778904fc0aa9d560daffa5fd94e203c9cf4963d
|
4
|
+
data.tar.gz: e51be9e241435f2ba7d545e66b68caad81da09f807b31770e4ce40155ae98e3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a69de6c69df04f0a5797e00fe72cef4c428750a8111d93a0e95667a151a7e32d93a12b05b2fecf8a1a42ffa5fa8ae96c130d876a86a80ba2920e7564ccda52bf
|
7
|
+
data.tar.gz: 3fe3fbcaee6edee3a4cc1eb2be647bcd98e95cba1b5b5a1b632750855a331a58cca2524bdfa9b30ae3ec8c32043067e81951ee0cb9edf0f2e7f7bcf9c99b77be
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,26 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.1.98](https://github.com/STARTcloud/vagrant-zones/compare/v0.1.97...v0.1.98) (2024-10-11)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* handle invalid characters in zlogin for alma9 ([94e9784](https://github.com/STARTcloud/vagrant-zones/commit/94e978497537f9d7edf4958e35d2797e328edda2))
|
9
|
+
* handle invalid characters in zlogin for alma9 ([a9d5425](https://github.com/STARTcloud/vagrant-zones/commit/a9d542501288eb819eb33aff0930b853a8e8d41c))
|
10
|
+
* handle invalid characters in zlogin for alma9 ([9256d12](https://github.com/STARTcloud/vagrant-zones/commit/9256d1223b04ec890fee9dfdea0433b579e3ae26))
|
11
|
+
* handle invalid characters in zlogin for alma9 ([67ca751](https://github.com/STARTcloud/vagrant-zones/commit/67ca7515359977eebb345e6730cee7241d8893c2))
|
12
|
+
|
13
|
+
## [0.1.97](https://github.com/STARTcloud/vagrant-zones/compare/v0.1.96...v0.1.97) (2024-08-17)
|
14
|
+
|
15
|
+
|
16
|
+
### Bug Fixes
|
17
|
+
|
18
|
+
* add destroy confirmation ([f04e30a](https://github.com/STARTcloud/vagrant-zones/commit/f04e30a3d522dd34568fe99ce6199ae771570b4b))
|
19
|
+
* it was there all along ([7355e11](https://github.com/STARTcloud/vagrant-zones/commit/7355e11f15d932c92cf6a678dc574414620992de))
|
20
|
+
* linting - add destroy confirmation ([35786fc](https://github.com/STARTcloud/vagrant-zones/commit/35786fcd404096362211a2a07b44e901b46cc295))
|
21
|
+
* linting - add destroy confirmation ([31d0140](https://github.com/STARTcloud/vagrant-zones/commit/31d0140da06c66100e78fdd9618394d32428130b))
|
22
|
+
* linting - add destroy confirmation ([30e0324](https://github.com/STARTcloud/vagrant-zones/commit/30e0324a1b0865574d3adb95f3cffbe6656bdd05))
|
23
|
+
|
3
24
|
## [0.1.96](https://github.com/STARTcloud/vagrant-zones/compare/v0.1.95...v0.1.96) (2024-08-17)
|
4
25
|
|
5
26
|
|
data/lib/vagrant-zones/action.rb
CHANGED
@@ -6,7 +6,7 @@ require 'log4r'
|
|
6
6
|
module VagrantPlugins
|
7
7
|
module ProviderZone
|
8
8
|
# Run actions against the machine
|
9
|
-
module Action
|
9
|
+
module Action # rubocop:disable Metrics/ModuleLength
|
10
10
|
include Vagrant::Action::Builtin
|
11
11
|
@logger = Log4r::Logger.new('vagrant_zones::action')
|
12
12
|
|
@@ -116,8 +116,17 @@ module VagrantPlugins
|
|
116
116
|
# This is the action that is primarily responsible for completely freeing the resources of the underlying virtual machine.
|
117
117
|
def self.action_destroy
|
118
118
|
Vagrant::Action::Builder.new.tap do |b|
|
119
|
-
b.use Call, IsCreated do |
|
120
|
-
|
119
|
+
b.use Call, IsCreated do |env1, b2|
|
120
|
+
unless env1[:result]
|
121
|
+
b2.use NotCreated
|
122
|
+
b2.use Call, DestroyConfirm do |env2, b3|
|
123
|
+
b3.use Destroy if env2[:result]
|
124
|
+
end
|
125
|
+
next
|
126
|
+
end
|
127
|
+
b2.use Call, DestroyConfirm do |env2, b3|
|
128
|
+
b3.use Destroy if env2[:result]
|
129
|
+
end
|
121
130
|
end
|
122
131
|
end
|
123
132
|
end
|
data/lib/vagrant-zones/driver.rb
CHANGED
@@ -315,7 +315,7 @@ module VagrantPlugins
|
|
315
315
|
## Manage Network Interfaces
|
316
316
|
def network(uii, state)
|
317
317
|
config = @machine.provider_config
|
318
|
-
uii.info(I18n.t('vagrant_zones.creating_networking_interfaces')) if state == 'create'
|
318
|
+
uii.info(I18n.t('vagrant_zones.creating_networking_interfaces')) if state == 'create' && !config.on_demand_vnics
|
319
319
|
@machine.config.vm.networks.each do |adaptertype, opts|
|
320
320
|
case adaptertype.to_s
|
321
321
|
when 'public_network'
|
@@ -1219,31 +1219,45 @@ module VagrantPlugins
|
|
1219
1219
|
def zloginboot(uii)
|
1220
1220
|
name = @machine.name
|
1221
1221
|
config = @machine.provider_config
|
1222
|
-
lcheck = config.lcheck
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
bstring = config.booted_string unless config.booted_string.nil?
|
1228
|
-
zunlockboot = 'Importing ZFS root pool'
|
1229
|
-
zunlockboot = config.zunlockboot unless config.zunlockboot.nil?
|
1230
|
-
zunlockbootkey = config.zunlockbootkey unless config.zunlockbootkey.nil?
|
1222
|
+
lcheck = config.lcheck || ':~'
|
1223
|
+
alcheck = config.alcheck || 'login:'
|
1224
|
+
bstring = config.booted_string || ' OK '
|
1225
|
+
zunlockboot = config.zunlockboot || 'Importing ZFS root pool'
|
1226
|
+
zunlockbootkey = config.zunlockbootkey
|
1231
1227
|
pcheck = 'Password:'
|
1228
|
+
|
1232
1229
|
uii.info(I18n.t('vagrant_zones.automated-zlogin'))
|
1230
|
+
|
1233
1231
|
PTY.spawn("pfexec zlogin -C #{name}") do |zlogin_read, zlogin_write, pid|
|
1234
1232
|
Timeout.timeout(config.setup_wait) do
|
1235
1233
|
rsp = []
|
1236
1234
|
|
1237
1235
|
loop do
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1236
|
+
begin
|
1237
|
+
zlogin_read.expect(/\r\n/) do |line|
|
1238
|
+
line = line.first if line.is_a?(Array)
|
1239
|
+
encoded_line = line.to_s.encode('UTF-8', invalid: :replace, undef: :replace, replace: '')
|
1240
|
+
rsp.push encoded_line unless encoded_line.empty?
|
1241
|
+
end
|
1242
|
+
rescue ArgumentError
|
1243
|
+
# Silently ignore encoding errors
|
1244
|
+
next
|
1245
|
+
end
|
1246
|
+
|
1247
|
+
uii.info(rsp[-1]) if config.debug_boot && !rsp.empty?
|
1248
|
+
|
1249
|
+
if !rsp.empty? && rsp[-1].match(/#{zunlockboot}/)
|
1250
|
+
sleep(2)
|
1251
|
+
zlogin_write.printf("#{zunlockbootkey}\n") if zunlockbootkey
|
1252
|
+
zlogin_write.printf("\n")
|
1253
|
+
uii.info(I18n.t('vagrant_zones.automated-zbootunlock'))
|
1254
|
+
end
|
1255
|
+
|
1256
|
+
next unless !rsp.empty? && rsp[-1].match(/#{bstring}/)
|
1257
|
+
|
1258
|
+
sleep(15)
|
1259
|
+
zlogin_write.printf("\n")
|
1260
|
+
break
|
1247
1261
|
end
|
1248
1262
|
|
1249
1263
|
if zlogin_read.expect(/#{alcheck}/)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-zones
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.98
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Gilbert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|