Skip to content

Conversation

@baude
Copy link
Member

@baude baude commented Dec 3, 2018

  • runlabel
  • checkpoint
  • restore
  • container|image exists
  • mount
  • unmount

Signed-off-by: baude [email protected]

@baude
Copy link
Member Author

baude commented Dec 3, 2018

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: baude

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 3, 2018
@baude baude force-pushed the mroevarlinkendpoints branch from a54556f to bc83f18 Compare December 3, 2018 15:20
Copy link
Member

Choose a reason for hiding this comment

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

I don't think Mount/Unmount make any sense in the context of a potentially remote API. Is there any way we can scope these so they're local-only? otherwise, I think we might want to investigate a Copy API instead.

Copy link
Member Author

Choose a reason for hiding this comment

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

I happen to differ here. In a pure API sense, folks might want to mount an image and do something on the images filesystem? like a scan?

Copy link
Member

Choose a reason for hiding this comment

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

If it's on a remote system, they can't do the scan without using our API to do it (or manually SSHing into the box in question, at which point, why not just use podman on that host?). If it goes through our API we can handle the mount/unmount ourselves.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, but the API isn't just for python, pypodman, or remote use. So someone could be developing local plugins and in other languages of course. Perhaps we agree to not expose this with our python library?

Copy link
Member

Choose a reason for hiding this comment

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

Agree. If we're doing that, though, I think we drop the show mounts endpoint? I don't see meaning in that outside of the Podman CLI

Copy link
Member Author

Choose a reason for hiding this comment

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

Id like to keep it; it is easy enough to expose. And again, we dont rightly know outside the python libraries what folks will do with it yet; if we dont want to expose it beyond the API, then we can just have @jwhonce not expose it

Copy link
Member

Choose a reason for hiding this comment

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

Ok I see @baude Point, that doing podman mount from a import podman makes some sense. Also this would allow cockpit to do it from nodejs. If we run this over SSH, then we should just block the call as not supported,

Copy link
Member

Choose a reason for hiding this comment

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

What do we need this for? What does it do, list all a container's bind mounts?

Copy link
Member Author

Choose a reason for hiding this comment

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

this is the equiv of podman mount with no args

@baude baude force-pushed the mroevarlinkendpoints branch 2 times, most recently from 42eb60a to d6b8f78 Compare December 3, 2018 16:44
* runlabel
* checkpoint
* restore
* container|image exists
* mount
* unmount

Signed-off-by: baude <[email protected]>
@baude baude force-pushed the mroevarlinkendpoints branch from d6b8f78 to 5c02dda Compare December 3, 2018 16:56
@baude
Copy link
Member Author

baude commented Dec 3, 2018

bot, retest this please

1 similar comment
@baude
Copy link
Member Author

baude commented Dec 3, 2018

bot, retest this please

@rhatdan
Copy link
Member

rhatdan commented Dec 3, 2018

LGTM


[func ContainerCheckpoint(name: string, keep: bool, leaveRunning: bool, tcpEstablished: bool) string](#ContainerCheckpoint)

[func ContainerExists(name: string) int](#ContainerExists)
Copy link
Member

Choose a reason for hiding this comment

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

Why is this better than calling GetContainer() and checking for an error?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is provided for convenience to match the CLI. It also returns a 0,1, other return code. Again, we have to think beyond the consumption of the API by python.

Copy link
Member

Choose a reason for hiding this comment

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

I don't see this as a Python issue at all, I can call the same thing from nodejs. Now we have two ways of determining if a container exists.

If GetContainer(foobar) returns an error constant that image does not exist, we don't need this other interface.

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, we agree


[func HistoryImage(name: string) ImageHistory](#HistoryImage)

[func ImageExists(name: string) int](#ImageExists)
Copy link
Member

Choose a reason for hiding this comment

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

Why is this better than GetImage() and checking for an error?

Copy link
Member

Choose a reason for hiding this comment

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

Probably from an API point of view, it is not. The exists calls were added to differentiate between errors of no exist versus , you can not check if container exists.

So i the GetImage returns an error code that can be determined to be Container does not exist versus permission denied, no need for the new API.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right

@jwhonce
Copy link
Member

jwhonce commented Dec 5, 2018

/lgtm

@baude baude deleted the mroevarlinkendpoints branch December 22, 2019 18:58
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 26, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants