Call to "get cmdb" on Darwin outside of a task throws bash error
@stantheman0128 がすでに取り組んでいます。
2026年9月23日 から。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- perl
調査の方向性
提供された Rexfile を Darwin 上で使って問題を再現し、その後 lib/Rex/Hardware/Memory.pm の 193 行付近と lib/Rex/Hardware/Swap.pm の 143 行付近を読んでください。タスクの外側と内側での get cmdb() の動作を比較してください。タスクの外側での呼び出しが、繰り返される free: command not found エラーを出力せずに完了すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
Following bash message is shown twice on STDERR:
sh: free: command not found
How to reproduce it
Steps to reproduce the behavior:
- Add the following code in the main body of a Rexfile outside of a task:
get cmdb()
Shortest code example that demonstrates the bug:
use Rex -feature => [ qw( 1.4 ) ];
get cmdb();
task test => sub {
};
1;
Expected behavior
No error.
Circumstances
- Rex version: 11
- Perl version: 5.24.4
- OS running rex: Darwin (Catalina, 10.15.5)
- OS managed by rex: Darwin
Other
The error can be hacked around by change commenting out this line in Rex/Hardware/Memory:
https://github.com/RexOps/Rex/blob/master/lib/Rex/Hardware/Memory.pm#L193
and replace with:
$free_str = '';
The same hack needs to be done to the line at: https://github.com/RexOps/Rex/blob/master/lib/Rex/Hardware/Swap.pm#L143
Obviously these are not proper fixes and are provided here to help pinpoint the problem.
Finally, the bug does not occur when get cmdb() is called from inside a task.
- 主要言語
- Perl
- スター
- 736
- フォーク
- 217
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
RexOps/Rex のほかの issue
-
is_redhat() misses Rocky/Alma/CentOS Stream/Oracle Linux lsb_release IDs -> pkg dies "OS/Provider not supported"対応中かも @stantheman0128 が 20 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
-
triage needed
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
triage needed
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
libwww-perl/URI#211 ·
-
Type: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
inverse-inc/packetfence#9549 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
jimsalterjrs/sanoid#1116 · リアクション 1 件 ·
-
Add .gitattributes so share/skel keeps LF on a Windows git checkout対応中かも @sadhana-s-codez が 4 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
PerlDancer/Dancer2#1854 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信