Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage Swap Devices using Ginger #23

Closed
harche opened this issue Oct 1, 2015 · 5 comments
Closed

Manage Swap Devices using Ginger #23

harche opened this issue Oct 1, 2015 · 5 comments

Comments

@harche
Copy link
Contributor

harche commented Oct 1, 2015

Using the Ginger we would like to list/add/remove the swap devices used by the host. Here is the example of swap devices attached to the host

cat /proc/swaps

Filename    Type    Size    Used    Priority
/dev/dm-2 partition 7864316 679660  -1

Here is the proposal for Ginger to do swap management on the host -

Collection: Swap devices

URI: /plugins/ginger/swaps

Methods:

GET: Retrieve a summarized list of all swap devices
POST: Create a swap device

  • type : Type could be either device or file. Linux allows you to use either the block device or a regular file as a swap device. We would like to have support for both types.
  • size : Only applicable if the swap device type is file. We need to know the size of the regular file that needs to be created which will act as a swap device.
  • file_loc : Absolute path of the device.

Resource: Swap Device

URI: /plugins/ginger/swaps/:device_name

Methods:

GET: Retrieve the full description of a Swap Device

  • filename: File name of the Swap Device
  • type: The type of the Swap Device. partition for the block device and file for the regular file.
  • size: Size of the Swap Device
  • used: Amount of Swap Device space used
  • priority : Priority of the Swap Device

DELETE: Remove the Swap Device

@pvital
Copy link

pvital commented Oct 1, 2015

@harche interesting feature, but please, send a RFC (Request For Comments) to ginger mailing list ginger-dev-list@nongnu.org (CC also the old ML ginger-dev@yahoogroups.com due to delivery issues on nongnu lists). There you will get more feedback than here.

@danielhb
Copy link
Contributor

danielhb commented Oct 2, 2015

Is it possible to update an existing swap device?

And what tools are you planning to use to implement this feature?

On 10/01/2015 07:13 AM, harche wrote:

Using the |Ginger| we would like to list/add/remove the swap devices
used by the host. Here is the example of swap devices attached to the host

cat /proc/swaps

|Filename Type Size Used Priority
/dev/dm-2 partition 7864316 679660 -1
|

Here is the proposal for |Ginger| to do swap management on the host -

*Collection: Swap devices*

URI: /plugins/ginger/swaps

Methods:

GET: Retrieve a summarized list of all swap devices
POST: Create a swap device

  • /type/ : Type could be either |device| or |file|. Linux allows you
    to use either the |block device| or a |regular file| as a swap
    device. We would like to have support for both types.

  • /size/ : Only applicable if the swap device type is |file|. We
    need to know the size of the regular file that needs to be created
    which will act as a swap device.

  • /device_path/ : Absolute path of the device.

    Resource: Swap Device

URI: /plugins/ginger/swaps//:device_name/

Methods:

GET: Retrieve the full description of a Swap Device

  • /filename/: File name of the Swap Device
  • /type/: The type of the Swap Device. |partition| for the block
    device and |file| for the regular file.
  • /size/: Size of the Swap Device
  • /used/: Amount of Swap Device space used
  • /priority/ : Priority of the Swap Device

DELETE: Remove the Swap Device


Reply to this email directly or view it on GitHub
#23.

@harche
Copy link
Contributor Author

harche commented Oct 5, 2015

@danielhb

  • For the first release of this feature, we want to support only creation, listing and deletion of the swap space. Later releases will focus on changes the attributes of the swap device like priority, size etc.
  • We have modelled swap devices like most of the other resources in kimchi. Which is specified in the issue description above. For actually interacting with system, we are executing commands on it and analyse the return values and status.

@danielhb
Copy link
Contributor

danielhb commented Oct 6, 2015

It is ok to start it 'small' with the first release in my opinion.

I suggest to forward the first post of this issue to ginger-dev-list@googlegroups.com to get comments from the rest of the community.

Thanks

@danielhb
Copy link
Contributor

This feature is implemented at current master branch.

Thanks!

danielhb pushed a commit that referenced this issue Jan 22, 2016
This patch fixes the issue by adjusting the width of columns
of the table which displays SAN Adapters

Signed-off-by: Harshal Patil <harshalp@linux.vnet.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants