Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(FACT-3463) Add server to mountpoint device for AIX #2734

Merged
merged 1 commit into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions lib/facter/resolvers/aix/mountpoints.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,14 @@ def read_mount(fact_name)
def add_mount_points_fact(line)
elem = line.split("\s")

elem.shift unless line[0] == ' '
if line[0] != ' '
server = elem.shift
device = "#{server}:#{elem[0]}"
else
device = elem[0]
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah interesting, there was a previous fix 6c6ef2d to just ignore the server. Could you mention that in your commit message?


@fact_list[:mountpoints][elem[1]] = { device: elem[0], filesystem: elem[2],
@fact_list[:mountpoints][elem[1]] = { device: device, filesystem: elem[2],
options: elem.last.include?(':') ? [] : elem.last.split(',') }
end

Expand Down
2 changes: 1 addition & 1 deletion spec/facter/resolvers/aix/mountpoints_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
filesystem: 'x', options: ['rw', 'nodev', 'log=/dev/hd3'], size: '206.64 MiB',
size_bytes: 216_678_912, used: '1.58 MiB', used_bytes: 1_655_296 },
'/tmp/salam' => { available: '63.57 GiB', available_bytes: 68_253_413_376, capacity: '7.20%',
device: '/var/share', filesystem: 'nfs3', options: [], size: '68.50 GiB',
device: 'joe:/var/share', filesystem: 'nfs3', options: [], size: '68.50 GiB',
size_bytes: 73_549_217_792, used: '4.93 GiB', used_bytes: 5_295_804_416 } }
end

Expand Down