Upgrade to Pro — share decks privately, control downloads, hide ads and more …

プライベートクラウドのストレージライフサイクル問題に立ち向かう!〜ストレージ間マイグレーションの話〜

Avatar for akam1o akam1o
August 21, 2023

 プライベートクラウドのストレージライフサイクル問題に立ち向かう!〜ストレージ間マイグレーションの話〜

Avatar for akam1o

akam1o

August 21, 2023

More Decks by akam1o

Other Decks in Technology

Transcript

  1. whoami 神尾 皓 (Akira KAMIO) •株式会社サイバーエージェント ◦CyberAgent group Infrastructure Unit (CIU)

    ◦Development Div, IaaS Team •2020/06 中途入社 ◦入社以来、一貫してIaaS基盤の開発/運用業務に従事 ◦Qemu/KVM や高集約コンピュートノードの最適化に興味がある 2
  2. CA のプライベートクラウドについて • プライベートクラウドとしてサービスに提供 IaaS (OpenStack) SaaS DB Kubernetes GitHub

    Actions Runner etc… • 規模感 HV: 1000+ VM: 5000+ ・Diskless Hypervisor ・AKE (Astro Kubernetes Engine) 4
  3. cinder retype ・OpenStack にはバックエンドストレージを変更するための  仕組みがある(openstack CLI は未対応) ・この仕組みを使うと cinder でいい感じに

    volume を  マイグレーションしてくれる(dd) $ cinder retype $SRC_VOL_UUID $DST_TYPE →今回の環境ではベンダー固有の extra_spec が設定されており不可 15
  4. OpenStack Migration System Overview storage A
 storage B
 migration
 Agent


    migration
 DB
 migration
 UI
 migration
 API
 cinder-volume
 A driver
 B driver
 OpenStack
 DB
 Migration Manager 17
  5. OpenStack volume migration (1) storage A
 storage B
 migration
 Agent


    migration
 DB
 migration
 UI
 migration
 API
 cinder-volume
 A driver
 B driver
 OpenStack
 DB
 migration request polling 18
  6. OpenStack volume migration (2) storage A
 storage B
 migration
 Agent


    migration
 DB
 migration
 UI
 migration
 API
 cinder-volume
 A driver
 B driver
 OpenStack
 DB
 mount volume create / mount 19
  7. OpenStack volume migration (2) storage A
 storage B
 migration
 Agent


    migration
 DB
 migration
 UI
 migration
 API
 cinder-volume
 A driver
 B driver
 OpenStack
 DB
 mount volume create / mount dd 20
  8. OpenStack volume migration (3) storage A
 storage B
 migration
 Agent


    migration
 DB
 migration
 UI
 migration
 API
 cinder-volume
 A driver
 B driver
 OpenStack
 DB
 done update volume info update connection info 21
  9. OpenStack volume migration (3) storage A
 storage B
 migration
 Agent


    migration
 DB
 migration
 UI
 migration
 API
 cinder-volume
 A driver
 B driver
 OpenStack
 DB
 done update volume info update connection info 上手く移行できそうであったが… 22
  10. 直面した課題 ・Terraform の大規模利用ユーザが存在 ・Terraform で cinder boot 、その中で volume_type を指定

     ・Terraform は実行時にリソースの状態を見て   正しい状態になるように動作する  ・Terraform の実行によって移行した volume が再作成   -> データロスト 😇 23
  11. OpenStack (再掲)Migration System Overview storage A
 storage B
 migration
 Agent


    migration
 DB
 migration
 UI
 migration
 API
 cinder-volume
 A driver
 B driver
 OpenStack
 DB
 Migration Manager 26
  12. OpenStack Migration System with Custom Driver storage A
 storage B


    migration
 Agent
 migration
 DB
 migration
 UI
 migration
 API
 cinder-volume
 A driver
 B driver
 OpenStack
 DB
 Migration Manager custom driver
 OpenStack カスタムドライバ 27
  13. OpenStack volume migration storage A
 storage B
 migration
 Agent
 migration


    DB
 migration
 UI
 migration
 API
 cinder-volume
 A driver
 B driver
 OpenStack
 DB
 custom driver
 migration request polling mount volume create / mount dd update volume info update connection info 28
  14. OpenStack storage A へのリクエスト storage A
 storage B
 migration
 Agent


    migration
 DB
 migration
 UI
 migration
 API
 cinder-volume
 A driver
 B driver
 OpenStack
 DB
 custom driver
 1. cinder volume hoge 4. storage A へ命令 29 2. A/Bどちらに存在するか確認 3. A driver を呼び出し
  15. OpenStack storage B へのリクエスト storage A
 storage B
 migration
 Agent


    migration
 DB
 migration
 UI
 migration
 API
 cinder-volume
 A driver
 B driver
 OpenStack
 DB
 custom driver
 1. cinder volume hoge 4. storage B へ命令 30 2. A/Bどちらに存在するか確認 3. B driver を呼び出し
  16. OpenStack storage B へのリクエスト storage A
 storage B
 migration
 Agent


    migration
 DB
 migration
 UI
 migration
 API
 cinder-volume
 A driver
 B driver
 OpenStack
 DB
 custom driver
 1. cinder volume hoge 4. storage B へ命令 31 2. A/Bどちらに存在するか確認 3. B driver を呼び出し OpenStack を騙すことで volume_type 問題を解決
  17. まとめ ・ストレージの EoL が OpenStack の EoL になりうる ・OpenStack にはストレージマイグレーション機能がある

    ・Terraform で cinder を扱う場合は注意する ・CA ではストレージマイグレーションを  移行システムとカスタムドライバで解決した 33