superfly / flyctl

Command line tools for fly.io services
https://fly.io
Apache License 2.0
1.36k stars 224 forks source link

Add machine status info about import/migration event #3632

Closed aschiavo closed 3 weeks ago

aschiavo commented 4 weeks ago

Change Summary

What and Why: This change notifies the user when a machine was created by flyd because of a migration action. It's a first iteration while a better solution is implemented in nomad-firecracker.

aschiavo commented 4 weeks ago

@kzys This is the output for the command:

 go run . m status -a aschiavo-epic-stack-691c
? Select a machine: d8dd625fed5568 crimson-grass-559 (started, region qmx, process group 'app')
Machine ID: d8dd625fed5568
Instance ID: 01J08P60K8NK33K9P5MQ5M4QN8
State: started

VM
  ID            = d8dd625fed5568
  Instance ID   = 01J08P60K8NK33K9P5MQ5M4QN8
  State         = started
  Image         = aschiavo-epic-stack-691c:deployment-01HW81ZEKCE8GB6GV7506VCS7T
  Name          = crimson-grass-559
  Private IP    = fdaa:5:a89e:a7b:152:c79c:e922:2
  Region        = qmx
  Process Group = app
  CPU Kind      = shared
  vCPUs         = 1
  Memory        = 1024
  Created       = 2024-06-13T11:36:59Z
  Updated       = 2024-06-13T11:37:01Z
  Entrypoint    =
  Command       =
  Volume        = vol_r6gzo1p3yq83yxjv

Checks [0/3]
NAME                            STATUS          LAST UPDATED    OUTPUT
servicecheck-02-http-8080       critical        5h39m ago       connect: connection refused
servicecheck-01-http-8080       critical        5h39m ago       connect: connection refused
servicecheck-00-tcp-8080        critical        5h39m ago       connect: connection refused

Event Logs
STATE   EVENT   SOURCE  TIMESTAMP                       INFO
started start   flyd    2024-06-13T13:37:01.36+02:00
created launch  flyd    2024-06-13T13:36:59.864+02:00   import=true

Sounds good to me to change to migration/migrated , I went with import for consistency with flyd isImport but from user perspective is probably clearer if we go with something migration-related . Do you have a preference for either migration or migrated? I'll make the change tomorrow morning

kzys commented 4 weeks ago

Yeah. import is our internal lingo. Personally I like migrated=true

aschiavo commented 4 weeks ago

Done!