fix: 間違った Ubuntu イメージが選択されてしまうロジックの修正と、デバッグ用ユーティリティの追加 #261
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #256
概要
スタートアップスクリプトの実行問題を解決するため、Ubuntuアーカイブ選択ロジックを修正し、デバッグ機能とRakeタスクを追加しました。
✅ SSH接続成功!
問題の原因
間違ったUbuntuアーカイブが選択されていた:
正規表現が不適切で、Ubuntuを含む全てのアーカイブがマッチしていたため、最後にマッチした「CData Sync」が選択されていました。
修正内容
1. アーカイブ選択ロジックの修正
^Ubuntu Server
に変更して、Ubuntu Serverで始まるものだけを対象にbreak
を追加して最初にマッチしたアーカイブを使用2. デバッグ機能の追加
VERBOSE=true
環境変数でデバッグログを有効化3. Rakeタスク追加
rake server:status[サーバー名]
タスクを追加scripts/utils/check_server_status.rb
をRake統合テスト結果
$ nc -vz 133.242.227.219 22 Connection to 133.242.227.219 port 22 [tcp/ssh] succeeded!
変更ファイル
Rakefile
- server:statusタスク追加scripts/deploy.rb
- アーカイブ選択ロジック修正、VERBOSE対応scripts/sakura_server_user_agent.rb
- デバッグログ追加マージ準備完了
SSH接続が確認できたため、マージ可能です。