You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Tom Beerbower <tb...@hortonworks.com> on 2015/05/15 21:33:25 UTC
Review Request 34288: Views : "cannot load permission" error when
accessing the ambari view
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34288/
-----------------------------------------------------------
Review request for Ambari, Jonathan Hurley and Nate Cole.
Bugs: AMBARI-11183
https://issues.apache.org/jira/browse/AMBARI-11183
Repository: ambari
Description
-------
"cannot load permission" error when accessing the ambari view
The problem is that there are privileges in the DB that do not have an associated resource.
To reproduce:
Delete jars of views which have an instance left in ambari, from /var/lib/ambari-server/resources/views/ and restart ambari.
Diffs
-----
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ResourceEntity.java 04dbd76
ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ResourceEntityTest.java 35724d3
Diff: https://reviews.apache.org/r/34288/diff/
Testing
-------
Manual tested.
Added new unit test.
mvn clean test
Thanks,
Tom Beerbower
Re: Review Request 34288: Views : "cannot load permission" error when
accessing the ambari view
Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34288/#review84022
-----------------------------------------------------------
Ship it!
Ship It!
- Nate Cole
On May 15, 2015, 3:33 p.m., Tom Beerbower wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34288/
> -----------------------------------------------------------
>
> (Updated May 15, 2015, 3:33 p.m.)
>
>
> Review request for Ambari, Jonathan Hurley and Nate Cole.
>
>
> Bugs: AMBARI-11183
> https://issues.apache.org/jira/browse/AMBARI-11183
>
>
> Repository: ambari
>
>
> Description
> -------
>
> "cannot load permission" error when accessing the ambari view
>
> The problem is that there are privileges in the DB that do not have an associated resource.
>
> To reproduce:
> Delete jars of views which have an instance left in ambari, from /var/lib/ambari-server/resources/views/ and restart ambari.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ResourceEntity.java 04dbd76
> ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ResourceEntityTest.java 35724d3
>
> Diff: https://reviews.apache.org/r/34288/diff/
>
>
> Testing
> -------
>
> Manual tested.
>
> Added new unit test.
>
> mvn clean test
>
>
> Thanks,
>
> Tom Beerbower
>
>
Re: Review Request 34288: Views : "cannot load permission" error when
accessing the ambari view
Posted by Tom Beerbower <tb...@hortonworks.com>.
> On May 15, 2015, 7:39 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ResourceEntity.java, line 59
> > <https://reviews.apache.org/r/34288/diff/1/?file=961537#file961537line59>
> >
> > I'm not familiar with the resource->privilege relationship. Can a two resources possible share the same privilege?
A privilege is an association between a single principal, permission and resource (e.g. John has OPERATOR permission on cluster C1)
So, a privilege is associated with a single resource, but a resource can be associated with many privileges.
- Tom
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34288/#review83963
-----------------------------------------------------------
On May 15, 2015, 7:33 p.m., Tom Beerbower wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34288/
> -----------------------------------------------------------
>
> (Updated May 15, 2015, 7:33 p.m.)
>
>
> Review request for Ambari, Jonathan Hurley and Nate Cole.
>
>
> Bugs: AMBARI-11183
> https://issues.apache.org/jira/browse/AMBARI-11183
>
>
> Repository: ambari
>
>
> Description
> -------
>
> "cannot load permission" error when accessing the ambari view
>
> The problem is that there are privileges in the DB that do not have an associated resource.
>
> To reproduce:
> Delete jars of views which have an instance left in ambari, from /var/lib/ambari-server/resources/views/ and restart ambari.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ResourceEntity.java 04dbd76
> ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ResourceEntityTest.java 35724d3
>
> Diff: https://reviews.apache.org/r/34288/diff/
>
>
> Testing
> -------
>
> Manual tested.
>
> Added new unit test.
>
> mvn clean test
>
>
> Thanks,
>
> Tom Beerbower
>
>
Re: Review Request 34288: Views : "cannot load permission" error when
accessing the ambari view
Posted by Jonathan Hurley <jh...@hortonworks.com>.
> On May 15, 2015, 3:39 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ResourceEntity.java, line 59
> > <https://reviews.apache.org/r/34288/diff/1/?file=961537#file961537line59>
> >
> > I'm not familiar with the resource->privilege relationship. Can a two resources possible share the same privilege?
>
> Tom Beerbower wrote:
> A privilege is an association between a single principal, permission and resource (e.g. John has OPERATOR permission on cluster C1)
>
> So, a privilege is associated with a single resource, but a resource can be associated with many privileges.
Gotcha, I was mostly concerned with the cascading removal.
- Jonathan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34288/#review83963
-----------------------------------------------------------
On May 15, 2015, 3:33 p.m., Tom Beerbower wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34288/
> -----------------------------------------------------------
>
> (Updated May 15, 2015, 3:33 p.m.)
>
>
> Review request for Ambari, Jonathan Hurley and Nate Cole.
>
>
> Bugs: AMBARI-11183
> https://issues.apache.org/jira/browse/AMBARI-11183
>
>
> Repository: ambari
>
>
> Description
> -------
>
> "cannot load permission" error when accessing the ambari view
>
> The problem is that there are privileges in the DB that do not have an associated resource.
>
> To reproduce:
> Delete jars of views which have an instance left in ambari, from /var/lib/ambari-server/resources/views/ and restart ambari.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ResourceEntity.java 04dbd76
> ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ResourceEntityTest.java 35724d3
>
> Diff: https://reviews.apache.org/r/34288/diff/
>
>
> Testing
> -------
>
> Manual tested.
>
> Added new unit test.
>
> mvn clean test
>
>
> Thanks,
>
> Tom Beerbower
>
>
Re: Review Request 34288: Views : "cannot load permission" error when
accessing the ambari view
Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34288/#review83963
-----------------------------------------------------------
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ResourceEntity.java
<https://reviews.apache.org/r/34288/#comment135028>
I'm not familiar with the resource->privilege relationship. Can a two resources possible share the same privilege?
- Jonathan Hurley
On May 15, 2015, 3:33 p.m., Tom Beerbower wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34288/
> -----------------------------------------------------------
>
> (Updated May 15, 2015, 3:33 p.m.)
>
>
> Review request for Ambari, Jonathan Hurley and Nate Cole.
>
>
> Bugs: AMBARI-11183
> https://issues.apache.org/jira/browse/AMBARI-11183
>
>
> Repository: ambari
>
>
> Description
> -------
>
> "cannot load permission" error when accessing the ambari view
>
> The problem is that there are privileges in the DB that do not have an associated resource.
>
> To reproduce:
> Delete jars of views which have an instance left in ambari, from /var/lib/ambari-server/resources/views/ and restart ambari.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ResourceEntity.java 04dbd76
> ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ResourceEntityTest.java 35724d3
>
> Diff: https://reviews.apache.org/r/34288/diff/
>
>
> Testing
> -------
>
> Manual tested.
>
> Added new unit test.
>
> mvn clean test
>
>
> Thanks,
>
> Tom Beerbower
>
>
Re: Review Request 34288: Views : "cannot load permission" error when
accessing the ambari view
Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34288/#review83966
-----------------------------------------------------------
Ship it!
- Jonathan Hurley
On May 15, 2015, 3:33 p.m., Tom Beerbower wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34288/
> -----------------------------------------------------------
>
> (Updated May 15, 2015, 3:33 p.m.)
>
>
> Review request for Ambari, Jonathan Hurley and Nate Cole.
>
>
> Bugs: AMBARI-11183
> https://issues.apache.org/jira/browse/AMBARI-11183
>
>
> Repository: ambari
>
>
> Description
> -------
>
> "cannot load permission" error when accessing the ambari view
>
> The problem is that there are privileges in the DB that do not have an associated resource.
>
> To reproduce:
> Delete jars of views which have an instance left in ambari, from /var/lib/ambari-server/resources/views/ and restart ambari.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ResourceEntity.java 04dbd76
> ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ResourceEntityTest.java 35724d3
>
> Diff: https://reviews.apache.org/r/34288/diff/
>
>
> Testing
> -------
>
> Manual tested.
>
> Added new unit test.
>
> mvn clean test
>
>
> Thanks,
>
> Tom Beerbower
>
>