manageiq-appliance_console 3.3.1 → 3.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: '09811884db4414d12dd29905002919e0af0dbfaa'
4
- data.tar.gz: e7633d92380c8d5befe8cb6480338000384d01db
2
+ SHA256:
3
+ metadata.gz: ce6e154b0eedf8258d81d045881f2fa43de53b72c548809b8d9e8a0714cc4ec0
4
+ data.tar.gz: a89730c58fe0e5887815c1ff49565f99e85cb5a9c4eba5d53e5f8db2f02b29b7
5
5
  SHA512:
6
- metadata.gz: 04b07dbb6cc26aaab9806056a9b9e734adbd3e6476b9e574a8e60e22f154fad93d4a2dd5d58aef491e639e0daf1c3f09d5cbc1e99e401ee7c37376ba89cea2bd
7
- data.tar.gz: cf735ee98ca35728a28d199a8413ec92cd0bee84467af60dc33170984abc95ade0609839d88d01ede5431940cf3802e5598afb32972d5bc9114b0bd19d3235bb
6
+ metadata.gz: 718b6480550e954f797ab9df1731c7873101dddb779309183cc31c80ec188c39c48226850caeb715e4cf6a4c61b52c341857ddf8a0c251c162bfe4c8cd5d7be1
7
+ data.tar.gz: 5f78670f199ea6cb3619d93175db591d99f9aedee885c798e7ddf1afdb4f12a3099975be589e2f03847768c238d15d5b069b100e4cc72ba1f582ed7b098474db
data/Gemfile CHANGED
@@ -3,4 +3,4 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in manageiq-smartstate.gemspec
4
4
  gemspec
5
5
 
6
- gem "manageiq-gems-pending", :git => "https://github.com/ManageIQ/manageiq-gems-pending", :branch => "master"
6
+ gem "manageiq-gems-pending", :git => "https://github.com/ManageIQ/manageiq-gems-pending", :branch => "hammer"
@@ -34,8 +34,9 @@ module ApplianceConsole
34
34
  create_volume_group
35
35
  create_logical_volume_to_fill_volume_group
36
36
  format_logical_volume
37
- mount_disk
38
37
  update_fstab
38
+ lazy_unmount_mount_point
39
+ mount_disk
39
40
  end
40
41
 
41
42
  private
@@ -69,30 +70,32 @@ module ApplianceConsole
69
70
  AwesomeSpawn.run!("mkfs.#{filesystem_type} #{logical_volume.path}")
70
71
  end
71
72
 
73
+ def lazy_unmount_mount_point
74
+ AwesomeSpawn.run!("umount", :params => ["-l", mount_point.to_s]) if File.file?("/proc/mounts") && File.read("/proc/mounts").include?(" #{mount_point} ")
75
+ end
76
+
72
77
  def mount_disk
73
78
  if mount_point.symlink?
74
79
  FileUtils.rm_rf(mount_point)
75
80
  FileUtils.mkdir_p(mount_point)
76
81
  end
77
- AwesomeSpawn.run!("mount", :params => {"-t" => filesystem_type,
78
- nil => [logical_volume.path, mount_point]})
82
+ AwesomeSpawn.run!("mount", :params => ["-a"])
79
83
  end
80
84
 
81
85
  def update_fstab
82
86
  fstab = LinuxAdmin::FSTab.instance
83
- return if fstab.entries.find { |e| e.mount_point == mount_point }
87
+ entry = fstab.entries.find { |e| e.mount_point == mount_point.to_s } || LinuxAdmin::FSTabEntry.new
88
+ fstab.entries.delete(entry)
84
89
 
85
- entry = LinuxAdmin::FSTabEntry.new(
86
- :device => logical_volume.path,
87
- :mount_point => mount_point,
88
- :fs_type => filesystem_type,
89
- :mount_options => "rw,noatime",
90
- :dumpable => 0,
91
- :fsck_order => 0
92
- )
90
+ entry.device = logical_volume_path
91
+ entry.mount_point = mount_point
92
+ entry.fs_type = filesystem_type
93
+ entry.mount_options = "rw,noatime"
94
+ entry.dumpable = 0
95
+ entry.fsck_order = 0
93
96
 
94
97
  fstab.entries << entry
95
- fstab.write! # Test this more, whitespace is removed
98
+ fstab.write!
96
99
  end
97
100
  end
98
101
  end
@@ -1,5 +1,5 @@
1
1
  module ManageIQ
2
2
  module ApplianceConsole
3
- VERSION = '3.3.1'.freeze
3
+ VERSION = '3.3.2'.freeze
4
4
  end
5
5
  end
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.add_runtime_dependency "bcrypt", "~> 3.1.10"
27
27
  spec.add_runtime_dependency "highline", "~> 1.6.21"
28
28
  spec.add_runtime_dependency "i18n", "~> 0.7"
29
- spec.add_runtime_dependency "linux_admin", ["~> 1.0", ">=1.2.2"]
29
+ spec.add_runtime_dependency "linux_admin", ["~> 1.0", ">=1.2.4"]
30
30
  spec.add_runtime_dependency "pg"
31
31
  spec.add_runtime_dependency "trollop", "~> 2.0"
32
32
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: manageiq-appliance_console
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.1
4
+ version: 3.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ManageIQ Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-14 00:00:00.000000000 Z
11
+ date: 2019-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -103,7 +103,7 @@ dependencies:
103
103
  version: '1.0'
104
104
  - - ">="
105
105
  - !ruby/object:Gem::Version
106
- version: 1.2.2
106
+ version: 1.2.4
107
107
  type: :runtime
108
108
  prerelease: false
109
109
  version_requirements: !ruby/object:Gem::Requirement
@@ -113,7 +113,7 @@ dependencies:
113
113
  version: '1.0'
114
114
  - - ">="
115
115
  - !ruby/object:Gem::Version
116
- version: 1.2.2
116
+ version: 1.2.4
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: pg
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -302,7 +302,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
302
302
  version: '0'
303
303
  requirements: []
304
304
  rubyforge_project:
305
- rubygems_version: 2.6.14.3
305
+ rubygems_version: 2.7.6.2
306
306
  signing_key:
307
307
  specification_version: 4
308
308
  summary: ManageIQ Appliance Console