botan-party / hansel

DiscordからMinecraftゲームサーバ(EC2)を操作するDiscordBot
MIT License
0 stars 1 forks source link

レスポンスを明示的に通知したい #1

Closed takenokoroid closed 3 years ago

takenokoroid commented 3 years ago

なぜ

Discordからの起動・停止のレスポンスがないと不安になる。 また、インスタンス起動ごとにIPが変わるため、IPを通知しないと接続できない。

希望通知内容

Sut103 commented 3 years ago

ほしいパターン

起動時

Sut103 commented 3 years ago

https://github.com/shokkunrf/tetona/blob/c137023bdf08e9bf38f4939da2be59158afcec73/main.go#L26-L29

Sut103 commented 3 years ago
Sut103 commented 3 years ago

今のところの方針をまとめるとこんな感じ。

起動時

懸念

  1. pending で起動した場合、stopping で終了した場合はどうなるんだろう...
  2. stopping で起動した場合、pending で終了した場合はどうなるんだろう...
Sut103 commented 3 years ago

懸念 1. pending で起動した場合、stopping で終了した場合について

Sut103 commented 3 years ago

懸念2. stopping で起動した場合、pending で終了した場合について

stoppingで起動 --> エラーになる

An error occurred (IncorrectInstanceState) when calling the StartInstances operation: The instance 'i-xxxxxxxxxxxxxxxxx' is not in a state from which it can be started.

pendingで終了 --> できる

{
    "StoppingInstances": [
        {
            "CurrentState": {
                "Code": 64,
                "Name": "stopping"
            },
            "InstanceId": "i-xxxxxxxxxxxxxxxxx",
            "PreviousState": {
                "Code": 0,
                "Name": "pending"
            }
        }
    ]
}
Sut103 commented 3 years ago