mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neil Conway (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MESOS-3961) Consider equality behavior for DiskInfo resource
Date Thu, 19 Nov 2015 21:18:11 GMT

    [ https://issues.apache.org/jira/browse/MESOS-3961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15014382#comment-15014382
] 

Neil Conway commented on MESOS-3961:
------------------------------------

This just seems like surprising behavior: if I create a PV with <id = 5, path = /foo, RW>
and try to delete the PV with <id = 5, path = /bar, RW>, there is a reasonably good
chance I've made a mistake and I was actually trying to delete a different volume.

Put another way, it seems confusing to *require* that a user specifies container_path when
deleting a PV, but then to ignore the path when we actually evaluate the deletion operation.

> Consider equality behavior for DiskInfo resource
> ------------------------------------------------
>
>                 Key: MESOS-3961
>                 URL: https://issues.apache.org/jira/browse/MESOS-3961
>             Project: Mesos
>          Issue Type: Bug
>            Reporter: Neil Conway
>            Priority: Minor
>              Labels: mesosphere, persistent-volumes
>
> Relevant code:
> {code}
> bool operator==(const Resource::DiskInfo& left, const Resource::DiskInfo& right)
> {
>   // NOTE: We ignore 'volume' inside DiskInfo when doing comparison
>   // because it describes how this resource will be used which has
>   // nothing to do with the Resource object itself. A framework can
>   // use this resource and specify different 'volume' every time it
>   // uses it.
>   if (left.has_persistence() != right.has_persistence()) {
>     return false;
>   }
>   if (left.has_persistence()) {
>     return left.persistence().id() == right.persistence().id();
>   }
>   return true;
> }
> {code}
> A consequence of this behavior is that if you pass the wrong path to a `destroy-volume`
request (but there is a persistent volume that otherwise matches the request), the path will
be ignored and the volume will be destroyed. Not clear if that is undesirable, but it does
seem surprising.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message