Skip to content

Conversation

@y-naga
Copy link

@y-naga y-naga commented Sep 16, 2015

We add the following SheepdogDriver method.

  • manage_existing
  • manage_existing_get_size
  • unmanage

We add the following SheepdogDriver method.

- manage_existing
- manage_existing_get_size

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: Failed to connect to sheep daemon

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修正しました。

@y-naga
Copy link
Author

y-naga commented Sep 17, 2015

unmanageメソッドの実装が漏れている。追加します。

unmanage時にはvolume-XXXのVDI名競合の可能性を排除するため、unmanage済みであることが分かるVDI名にrename(snapshot&clone)したいと思います。
他のドライバではunmanageの際に以下の命名規則の名前にrenameしているものがありました。

  1. volume-XXX-unmanaged
  2. unmanaged-volume-XXX
  3. cinder-unmanaged-XXX ※volume-は削除

どのフォーマットを選択するかは悩ましいところですが、もし元々の「volume-XXX」でgrepした際に対象となる様に3.の選択肢は除外。
後は好みではありますが、vdi listの見た目(volume-XXXまでの縦の並びが揃う)を考慮して「1. volume-XXX-unmanaged」としたいと思います。

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

処理完了後に該当ボリュームを削除してますが、この操作実施前に作成した既存のSheepdog Volumeのsnapshotは管理者が手動で消すという整理にということですよね。
そういう整理にするという認識が合っていれば良いです。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

スナップショットについてはcloneを実行するブロックのfinally句にてdelete_snapshotしていますので、管理者が運用で対処する必要はないと考えています。
snapshotを作成した場合はrename処理の成否に関わらず必ず削除し、rename(snap+clone)が成功した場合には元のボリュームを削除、途中で失敗した場合には元のボリュームは残す整理としています。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

前の回答が質問の意図とずれていましたので再回答。
manage対象のVDIが元々持つスナップショットについては、manage_existing及びunmanageでは関与(操作)としません。
そちらのスナップショットが不要な場合には、管理者に手動で削除して頂くという整理となります。

@y-naga y-naga changed the title Sheepdog: Implement abstract methods of manage_existing Sheepdog: Implement abstract methods of manage volume Sep 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants