vagrant-zones 0.1.97 → 0.1.99
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 +19 -0
- data/lib/vagrant-zones/action/import.rb +1 -1
- data/lib/vagrant-zones/driver.rb +44 -30
- data/lib/vagrant-zones/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2597df7f5e76aadf6d3415e4dafe33af5029f0e2c8975e23dbe599d64d0c0755
|
4
|
+
data.tar.gz: 362b02ad488fb43f98d0ca954a3d934fbb247ba684d49ab8aec23f97b09eb60f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c570fc6fc3aa56962c3b6da0ce3d4a95dd78cb5d41dbf27af426a331842e4d6084da3a7dc62a7b897911050fc2a88d4fcbfa6ea0305df408669b1f531b86117
|
7
|
+
data.tar.gz: 0a5f59044ce1e5524fe044858de4757932a05f84341dca3c8eaafcff4e9ab12ce1187c871639d6eba79bfa68577f86ef362affe1c72c138eae42d55926534d68
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.1.99](https://github.com/STARTcloud/vagrant-zones/compare/v0.1.98...v0.1.99) (2025-05-04)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* null vlans ([ef22b48](https://github.com/STARTcloud/vagrant-zones/commit/ef22b481a3e8293039b371dd49db00f87c71923f))
|
9
|
+
* rubocop linting errors ([48530c4](https://github.com/STARTcloud/vagrant-zones/commit/48530c41be5e46123d8773abdf651ff5ca0c879b))
|
10
|
+
* rubocop linting errors ([018b555](https://github.com/STARTcloud/vagrant-zones/commit/018b5551eaf64de5e404e6abee32f9257c214f07))
|
11
|
+
|
12
|
+
## [0.1.98](https://github.com/STARTcloud/vagrant-zones/compare/v0.1.97...v0.1.98) (2024-10-11)
|
13
|
+
|
14
|
+
|
15
|
+
### Bug Fixes
|
16
|
+
|
17
|
+
* handle invalid characters in zlogin for alma9 ([94e9784](https://github.com/STARTcloud/vagrant-zones/commit/94e978497537f9d7edf4958e35d2797e328edda2))
|
18
|
+
* handle invalid characters in zlogin for alma9 ([a9d5425](https://github.com/STARTcloud/vagrant-zones/commit/a9d542501288eb819eb33aff0930b853a8e8d41c))
|
19
|
+
* handle invalid characters in zlogin for alma9 ([9256d12](https://github.com/STARTcloud/vagrant-zones/commit/9256d1223b04ec890fee9dfdea0433b579e3ae26))
|
20
|
+
* handle invalid characters in zlogin for alma9 ([67ca751](https://github.com/STARTcloud/vagrant-zones/commit/67ca7515359977eebb345e6730cee7241d8893c2))
|
21
|
+
|
3
22
|
## [0.1.97](https://github.com/STARTcloud/vagrant-zones/compare/v0.1.96...v0.1.97) (2024-08-17)
|
4
23
|
|
5
24
|
|
@@ -66,7 +66,7 @@ module VagrantPlugins
|
|
66
66
|
ratelimit += 1
|
67
67
|
if ratelimit >= rate
|
68
68
|
uiprogress.clear_line
|
69
|
-
status = format('%.2f%%',
|
69
|
+
status = format('%.2f%%', amount_downloaded.to_f / file_size * 100)
|
70
70
|
uiprogress.info(I18n.t('vagrant_zones.importing_joyent_image') + "#{image} ==> ", new_line: false)
|
71
71
|
uiprogress.report_progress(status, 100, false)
|
72
72
|
ratelimit = 0
|
data/lib/vagrant-zones/driver.rb
CHANGED
@@ -727,7 +727,7 @@ module VagrantPlugins
|
|
727
727
|
uii.info(I18n.t('vagrant_zones.creating_vnic'))
|
728
728
|
uii.info(" #{vnic_name}")
|
729
729
|
command = "#{@pfexec} dladm create-vnic -l #{opts[:bridge]} -m #{mac}"
|
730
|
-
command += " -v #{opts[:vlan]}" unless opts[:vlan].nil? ||
|
730
|
+
command += " -v #{opts[:vlan]}" unless opts[:vlan].nil? || opts[:vlan].zero?
|
731
731
|
command += " #{vnic_name}"
|
732
732
|
execute(false, command)
|
733
733
|
end
|
@@ -928,9 +928,9 @@ module VagrantPlugins
|
|
928
928
|
## zonecfg function for CPU Configurations
|
929
929
|
def zonecfgcpu(uii, _name, config, zcfg)
|
930
930
|
uii.info(I18n.t('vagrant_zones.zonecfgcpu')) if config.debug
|
931
|
-
if config.cpu_configuration == 'simple' &&
|
931
|
+
if config.cpu_configuration == 'simple' && %w[bhyve kvm].include?(config.brand)
|
932
932
|
execute(false, %(#{zcfg}"add attr; set name=vcpus; set value=#{config.cpus}; set type=string; end;"))
|
933
|
-
elsif config.cpu_configuration == 'complex' &&
|
933
|
+
elsif config.cpu_configuration == 'complex' && %w[bhyve kvm].include?(config.brand)
|
934
934
|
hash = config.complex_cpu_conf[0]
|
935
935
|
cstring = %(sockets=#{hash['sockets']},cores=#{hash['cores']},threads=#{hash['threads']})
|
936
936
|
execute(false, %(#{zcfg}'add attr; set name=vcpus; set value="#{cstring}"; set type=string; end;'))
|
@@ -1054,15 +1054,15 @@ module VagrantPlugins
|
|
1054
1054
|
shrtstr2 = %(add property (name=ips,value="#{allowed_address}"); add property (name=primary,value="true"); end;)
|
1055
1055
|
execute(false, %(#{zonecfg_cmd}set global-nic=auto; #{shrtstr1} #{shrtstr2}"))
|
1056
1056
|
when 'bhyve'
|
1057
|
-
vlan_option = opts[:vlan].nil? || opts[:vlan].zero? ? '' : "set vlan-id=#{opts[:vlan]};
|
1057
|
+
vlan_option = opts[:vlan].nil? || opts[:vlan].zero? ? '' : "set vlan-id=#{opts[:vlan]};"
|
1058
1058
|
base_cmd = if config.on_demand_vnics
|
1059
|
-
%(
|
1059
|
+
%(add net; set physical=#{vnic_name}; #{vlan_option} set global-nic=#{opts[:bridge]};)
|
1060
1060
|
else
|
1061
|
-
%(
|
1061
|
+
%(add net; set physical=#{vnic_name};)
|
1062
1062
|
end
|
1063
|
-
execute(false, %(#{base_cmd}end;)) unless cie
|
1064
|
-
execute(false, %(#{base_cmd}set allowed-address=#{allowed_address}; end;)) if cie && aa
|
1065
|
-
execute(false, %(#{base_cmd}end;)) if cie && !aa
|
1063
|
+
execute(false, %(#{zonecfg_cmd} "#{base_cmd} end;")) unless cie
|
1064
|
+
execute(false, %(#{zonecfg_cmd} "#{base_cmd} set allowed-address=#{allowed_address}; end;")) if cie && aa
|
1065
|
+
execute(false, %(#{zonecfg_cmd} "#{base_cmd} end;")) if cie && !aa
|
1066
1066
|
end
|
1067
1067
|
end
|
1068
1068
|
|
@@ -1129,7 +1129,7 @@ module VagrantPlugins
|
|
1129
1129
|
|
1130
1130
|
## This setups the Netplan based OS Networking via Zlogin
|
1131
1131
|
def zoneniczloginsetup_netplan(uii, opts, mac)
|
1132
|
-
zlogin(uii, 'rm -rf /etc/netplan/*.yaml') if
|
1132
|
+
zlogin(uii, 'rm -rf /etc/netplan/*.yaml') if opts[:nic_number].zero?
|
1133
1133
|
ip = ipaddress(uii, opts)
|
1134
1134
|
vnic_name = vname(uii, opts)
|
1135
1135
|
servers = dnsservers(uii, opts).map { |server| server['nameserver'] }.join(', ') unless opts[:dns].nil?
|
@@ -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}/)
|
@@ -1630,7 +1644,7 @@ module VagrantPlugins
|
|
1630
1644
|
uii.info(I18n.t('vagrant_zones.cron_entries'))
|
1631
1645
|
h = { h: 'hourly', d: 'daily', w: 'weekly', m: 'monthly' }
|
1632
1646
|
h.each do |(_k, d)|
|
1633
|
-
next unless
|
1647
|
+
next unless [d, 'all'].include?(opts[:list])
|
1634
1648
|
|
1635
1649
|
uii.info(cronjobs[d.to_sym]) unless cronjobs[d.to_sym].nil?
|
1636
1650
|
end
|
@@ -1645,7 +1659,7 @@ module VagrantPlugins
|
|
1645
1659
|
h = { h: 'hourly', d: 'daily', w: 'weekly', m: 'monthly' }
|
1646
1660
|
uii.info(I18n.t('vagrant_zones.cron_delete'))
|
1647
1661
|
h.each do |(_k, d)|
|
1648
|
-
next unless
|
1662
|
+
next unless [d, 'all'].include?(opts[:delete])
|
1649
1663
|
|
1650
1664
|
cj = cronjobs[d.to_sym].to_s.gsub('*', '\*')
|
1651
1665
|
rc = "#{rmcr}'#{cj}' | #{sc}"
|
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.99
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Gilbert
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -176,7 +176,7 @@ metadata:
|
|
176
176
|
documentation_uri: http://rubydoc.info/gems/vagrant-zones
|
177
177
|
source_code_uri: https://github.com/STARTCloud/vagrant-zones
|
178
178
|
github_repo: https://github.com/STARTCloud/vagrant-zones
|
179
|
-
post_install_message:
|
179
|
+
post_install_message:
|
180
180
|
rdoc_options: []
|
181
181
|
require_paths:
|
182
182
|
- lib
|
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
192
|
version: 1.3.6
|
193
193
|
requirements: []
|
194
194
|
rubygems_version: 3.2.3
|
195
|
-
signing_key:
|
195
|
+
signing_key:
|
196
196
|
specification_version: 4
|
197
197
|
summary: Vagrant provider plugin to support zones
|
198
198
|
test_files: []
|