GitHub EnterpriseでActions用s3設定をミスっていてアップデートでコケるの巻

Octocat logo
◆ Live配信スケジュール ◆
サイオステクノロジーでは、Microsoft MVPの武井による「わかりみの深いシリーズ」など、定期的なLive配信を行っています。
⇒ 詳細スケジュールはこちらから
⇒ 見逃してしまった方はYoutubeチャンネルをご覧ください
【4/18開催】VSCode Dev Containersで楽々開発環境構築祭り〜Python/Reactなどなど〜
Visual Studio Codeの拡張機能であるDev Containersを使ってReactとかPythonとかSpring Bootとかの開発環境をラクチンで構築する方法を紹介するイベントです。
https://tech-lab.connpass.com/event/311864/

こんにちは、やまねです。以前に「メンテナンスアップデートしたらコケて難儀するなどした」というのを書きましたが、その顛末を晒します。

ある時、私は気づいていなかったのですが担当者の一人が「GitHub Actions使おう」としてストレージのAmazon S3設定したものの、正しく動かない状態で指定していました。

これが悲劇の幕開けだと知らずに…。

メンテナンスアップデートでコケる

鼻歌混じりでいつもどおりにGitHub Entepriseのメンテナンスアップデートを適用したらエラーでコケました。。。最初は「???」とパニックになったものの、理由はhotpatch.log を見るとどうやら「s3設定がおかしい」ことが判明。

Apr 03 03:14:39 Running migrations…
Apr 03 03:15:48 ERROR: Running migrations
Error: settings failed to apply, outputting last 30 lines of
/data/user/common/ghe-config.log:
at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext
executionContext)
at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext
executionContext)
at Amazon.Runtime.Internal.CredentialsRetriever.InvokeAsync[T](IExecutionContext
executionContext)
at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext
executionContext)
at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext
executionContext)
at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext
executionContext)
at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext
executionContext)
at Amazon.S3.Internal.AmazonS3ExceptionHandler.InvokeAsync[T](IExecutionContext
executionContext)
at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeAsync[T](IExecutionContext
executionContext)
at Amazon.Runtime.Internal.MetricsHandler.InvokeAsync[T](IExecutionContext
executionContext)
at Microsoft.VisualStudio.Services.Cloud.AmazonS3BlobProvider.PutChunkAsync(IVssRequestContext
requestContext, Guid containerId, String resourceId, Byte[] contentBlock, Int32 contentBlockLength, Int64 compressedLength, Int64 offset, Boolean isLastChunk, IDictionary`2 metadata, Nullable`1
clientTimeout) in
/mnt/_work/1/s/Vssf/Sdk/CloudServer/AmazonS3BlobProvider/AmazonS3BlobProvider.cs:line
321
at Microsoft.VisualStudio.Services.PowerShell.Cmdlets.TestStorageConnectionCmdlet.TryMultiPartUploadContentAsync(IVssRequestContext
requestContext, IBlobProvider provider, Guid containerName, String testFileName, String partContent) in /mnt/_work/1/s/Vssf/SdkTools/PowerShell/Cmdlets/TestStorageConnectionCmdlet.cs:line
192
============================================
Storage tests failed, please see output for more details.

at Microsoft.VisualStudio.Services.PowerShell.Cmdlets.TestStorageConnectionCmdlet.ProcessAsync(IVssRequestContext
requestContext) in
/mnt/_work/1/s/Vssf/SdkTools/PowerShell/Cmdlets/TestStorageConnectionCmdlet.cs:line
133
at Microsoft.VisualStudio.Services.PowerShell.Cmdlets.TestStorageConnectionCmdlet.ProcessRecordAsync()
in /mnt/_work/1/s/Vssf/SdkTools/PowerShell/Cmdlets/TestStorageConnectionCmdlet.cs:line
73
at Microsoft.VisualStudio.Services.Common.TaskExtensions.SyncResult(Task
task, SyncResultOptions options) in
/mnt/_work/1/s/Vssf/Client/Common/TaskExtensions.cs:line 32
at Microsoft.VisualStudio.Services.LightRail.LightRailCmdlet.RunWithActionQueueExecution(Func`1
toRun) in /mnt/_work/1/s/Vssf/SdkTools/PowerShell/Cmdlets/LightRailCmdlet.cs:line
1347
at Microsoft.VisualStudio.Services.LightRail.LightRailCmdlet.ProcessRecord()
in /mnt/_work/1/s/Vssf/SdkTools/PowerShell/Cmdlets/LightRailCmdlet.cs:line
201
at System.Management.Automation.Cmdlet.DoProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()
at <ScriptBlock>, <No file>: line 1
at <ScriptBlock>, /LR/Invoke-LightRail.ps1: line 95 LR actions> Creating new log file /LR/Logs/Actions_OnPrem_Test-StorageConnection_2021-04-03_03-15-46.log
LR actions> Test-Storage Connection utility for GitHub Enterprise Version : [2.22] LR actions> Configured Blob provider is :
[Microsoft.VisualStudio.Services.Cloud.AmazonS3BlobProvider]
============================================================
Please run “ghe-actions-check -s blob” to get the full error message.
Apr 03 03:15:48 ERROR: Running migrations

最初は「s3??」となりましたが、Actionsの存在に気づいて、Actionsの設定を削除して設定を保存したら問題なく立ち上がりました(と、簡単に書いてますが、ポンコツなので気付くまでには時間を要しました…)。

結論

  • Actions用のストレージ設定が間違ってるとアップデートかけた際、アップデート後のリスタートがストレージチェックでエラーになって止まるよ
  • サポートに問い合わせたところ「アップデートの適用前に ghe-actions-configure  して ghe-actions-check -s blob  すればActionsのストレージ設定に問題があればエラーになるからわかるよ」とのこと
  • 「将来のリリースでは先にチェックを走らせるなどの対応も検討するよ」らしいです
アバター画像
About サイオステクノロジーの中の人 9 Articles
Debian developerを務める傍ら、猫や幼児の相手をしている(合間に仕事)。
ご覧いただきありがとうございます! この投稿はお役に立ちましたか?

役に立った 役に立たなかった

0人がこの投稿は役に立ったと言っています。


ご覧いただきありがとうございます。
ブログの最新情報はSNSでも発信しております。
ぜひTwitterのフォロー&Facebookページにいいねをお願い致します!



>> 雑誌等の執筆依頼を受付しております。
   ご希望の方はお気軽にお問い合わせください!

Be the first to comment

Leave a Reply

Your email address will not be published.


*


質問はこちら 閉じる