vanagon 0.15.23 → 0.15.24

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
- SHA256:
3
- metadata.gz: 7bf8cec1d39b4fe95d0d109181be2d573f5be24eb8e1241936b5b9035022ebbd
4
- data.tar.gz: bc390abf3fe18a06fb82d7ed4936f54ca4f64840bb1b4374ec7f4a5d0c3119f7
2
+ SHA1:
3
+ metadata.gz: 4c90f6996d87caf5793fc3eaf0b7b609454d041b
4
+ data.tar.gz: 6c9d867da407534d7c7572c0ae5b309b9cd4f63c
5
5
  SHA512:
6
- metadata.gz: afd0ca4f73413d2f228e520f1456aa4f8c59cd9c28cd36522fc43a74d8b38d0e43b3a032de8703f3d821d469d02d12d9e9cf03c2456920bf820bfe218d86955a
7
- data.tar.gz: '08197372b61873aacff50c307f23fa80e7b566e6ad2c45bd98b7d662d101650f79594227438cd192febe4037d8746b44b472810663e3d13e80c6cfab2036b8cc'
6
+ metadata.gz: 59cbc9de7d13484bd6ee0e6c4909740d8666e32d2f79f40439c27cf76dfb206e08dcb424faa0acea098fdfe7314b5341afe470e70ba0a4521daaeccd5e853015
7
+ data.tar.gz: c86a251a3092cf00a30d46ff244999cae5501b95549c9a3b1544eb5032e0aea87d3e8bdfc21b8d54a8c8f50bcf1881e2eb38d6054f13bfdf1fa674a5f001808f
@@ -186,6 +186,8 @@ class Vanagon
186
186
  target_mode = '0644'
187
187
  default_mode = '0644'
188
188
  when "smf"
189
+ # modify version in smf manifest so service gets restarted after package upgrade
190
+ @component.install << %{#{@component.platform.sed} -ri 's/(<service.*version=)(".*")/\\1"#{Time.now.to_i}"/' #{service_file}}
189
191
  target_service_file = File.join(@component.platform.servicedir, service_type.to_s, "#{service_name}.xml")
190
192
  target_default_file = File.join(@component.platform.defaultdir, service_name)
191
193
  target_mode = '0644'
@@ -33,15 +33,22 @@ class Vanagon
33
33
  # This method is used to obtain a vm to build upon using
34
34
  # a docker container.
35
35
  # @raise [Vanagon::Error] if a target cannot be obtained
36
- def select_target
36
+ def select_target # rubocop:disable Metrics/AbcSize
37
37
  extra_args = @platform.docker_run_args.nil? ? [] : @platform.docker_run_args
38
38
 
39
39
  Vanagon::Utilities.ex("#{@docker_cmd} run -d --name #{build_host_name}-builder -p #{@platform.ssh_port}:22 #{extra_args.join(' ')} #{@platform.docker_image}")
40
40
  @target = 'localhost'
41
41
 
42
- # Wait for ssh to come up in the container
43
- Vanagon::Utilities.retry_with_timeout do
44
- Vanagon::Utilities.remote_ssh_command("#{@target_user}@#{@target}", 'exit', @platform.ssh_port)
42
+ # Wait for ssh to come up in the container. Retry 5 times with a 1
43
+ # second sleep between errors to account for network resets while SSHD
44
+ # is starting. Allow a maximum of 5 seconds for SSHD to start.
45
+ Vanagon::Utilities.retry_with_timeout(5, 5) do
46
+ begin
47
+ Vanagon::Utilities.remote_ssh_command("#{@target_user}@#{@target}", 'exit', @platform.ssh_port)
48
+ rescue StandardError => e
49
+ sleep(1) # Give SSHD some time to start.
50
+ raise e
51
+ end
45
52
  end
46
53
  rescue StandardError => e
47
54
  raise Vanagon::Error.wrap(e, "Something went wrong getting a target vm to build on using docker. Ssh was not up in the container after 5 seconds.")
@@ -116,6 +116,7 @@ class Vanagon
116
116
  @make = "/usr/bin/gmake"
117
117
  @tar = "/usr/bin/gtar"
118
118
  @patch = "/usr/bin/gpatch"
119
+ @sed = "/usr/gnu/bin/sed"
119
120
  @num_cores = "/usr/bin/kstat cpu_info | /usr/bin/ggrep -E '[[:space:]]+core_id[[:space:]]' | wc -l"
120
121
  super(name)
121
122
  if @architecture == "sparc"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vanagon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.23
4
+ version: 0.15.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-14 00:00:00.000000000 Z
11
+ date: 2019-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: git
@@ -261,7 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
261
261
  version: '0'
262
262
  requirements: []
263
263
  rubyforge_project:
264
- rubygems_version: 2.7.6
264
+ rubygems_version: 2.6.9
265
265
  signing_key:
266
266
  specification_version: 3
267
267
  summary: All of your packages will fit into this van with this one simple trick.