You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Venkata Siva Vijayendra Bhamidipati <vi...@citrix.com> on 2013/06/28 23:39:19 UTC
Review Request 12180: Fix NPE when adding invalid primary datastore
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12180/
-----------------------------------------------------------
Review request for cloudstack, Chip Childers, Devdeep Singh, Kelven Yang, and Sateesh Chodapuneedi.
Bugs: CLOUDSTACK-3110
Repository: cloudstack-git
Description
-------
Fixing an NPE when an attempt is made to add a primary datastore by providing an unreachable/nonexistent datastore/host.
Diffs
-----
engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java b92f92f
engine/storage/volume/src/org/apache/cloudstack/storage/datastore/manager/PrimaryDataStoreProviderManagerImpl.java 06b54e0
Diff: https://reviews.apache.org/r/12180/diff/
Testing
-------
With fix in place, an attempt to add an invalid primary datastore will fail with a GUI error dialog instead of failing silently with an NPE in the mgmt server log.
Thanks,
Venkata Siva Vijayendra Bhamidipati
Re: Review Request 12180: Fix NPE when adding invalid primary datastore
Posted by Venkata Siva Vijayendra Bhamidipati <vi...@citrix.com>.
> On June 29, 2013, 7:33 a.m., Prasanna Santhanam wrote:
> > engine/storage/volume/src/org/apache/cloudstack/storage/datastore/manager/PrimaryDataStoreProviderManagerImpl.java, line 59
> > <https://reviews.apache.org/r/12180/diff/1/?file=313061#file313061line59>
> >
> > This block should simply be:
> >
> > if (dataStoreVO == null) {
> > throw new CloudRuntimeException("Unable to locate primary datastore with id " + dataStoreVO.getId());
> > }
> > String providerName = dataStoreVO.getStorageProviderName();
>
> Sateesh Chodapuneedi wrote:
> Use dataStoreId instead of dataStoreVO.getId() in exception message
Will make these changes and resubmit the patch. Thanks Sateesh, Prasanna!
- Venkata Siva Vijayendra
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12180/#review22563
-----------------------------------------------------------
On July 3, 2013, 12:25 a.m., Venkata Siva Vijayendra Bhamidipati wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12180/
> -----------------------------------------------------------
>
> (Updated July 3, 2013, 12:25 a.m.)
>
>
> Review request for cloudstack, Chip Childers, Devdeep Singh, Kelven Yang, and Sateesh Chodapuneedi.
>
>
> Bugs: CLOUDSTACK-3110
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> Fixing an NPE when an attempt is made to add a primary datastore by providing an unreachable/nonexistent datastore/host.
>
>
> Diffs
> -----
>
> engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java 71df262
> engine/storage/volume/src/org/apache/cloudstack/storage/datastore/manager/PrimaryDataStoreProviderManagerImpl.java 06b54e0
>
> Diff: https://reviews.apache.org/r/12180/diff/
>
>
> Testing
> -------
>
> With fix in place, an attempt to add an invalid primary datastore will fail with a GUI error dialog instead of failing silently with an NPE in the mgmt server log.
>
>
> File Attachments
> ----------------
>
> Refactored patch for master-6-17-stable branch
> https://reviews.apache.org/media/uploaded/files/2013/06/29/0001-CLOUDSTACK-3110-VMWARE-NPE-while-adding-primary-stor.patch
>
>
> Thanks,
>
> Venkata Siva Vijayendra Bhamidipati
>
>
Re: Review Request 12180: Fix NPE when adding invalid primary datastore
Posted by Sateesh Chodapuneedi <sa...@citrix.com>.
> On June 29, 2013, 7:33 a.m., Prasanna Santhanam wrote:
> > engine/storage/volume/src/org/apache/cloudstack/storage/datastore/manager/PrimaryDataStoreProviderManagerImpl.java, line 59
> > <https://reviews.apache.org/r/12180/diff/1/?file=313061#file313061line59>
> >
> > This block should simply be:
> >
> > if (dataStoreVO == null) {
> > throw new CloudRuntimeException("Unable to locate primary datastore with id " + dataStoreVO.getId());
> > }
> > String providerName = dataStoreVO.getStorageProviderName();
Use dataStoreId instead of dataStoreVO.getId() in exception message
- Sateesh
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12180/#review22563
-----------------------------------------------------------
On June 29, 2013, 12:48 a.m., Venkata Siva Vijayendra Bhamidipati wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12180/
> -----------------------------------------------------------
>
> (Updated June 29, 2013, 12:48 a.m.)
>
>
> Review request for cloudstack, Chip Childers, Devdeep Singh, Kelven Yang, and Sateesh Chodapuneedi.
>
>
> Bugs: CLOUDSTACK-3110
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> Fixing an NPE when an attempt is made to add a primary datastore by providing an unreachable/nonexistent datastore/host.
>
>
> Diffs
> -----
>
> engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java b92f92f
> engine/storage/volume/src/org/apache/cloudstack/storage/datastore/manager/PrimaryDataStoreProviderManagerImpl.java 06b54e0
>
> Diff: https://reviews.apache.org/r/12180/diff/
>
>
> Testing
> -------
>
> With fix in place, an attempt to add an invalid primary datastore will fail with a GUI error dialog instead of failing silently with an NPE in the mgmt server log.
>
>
> File Attachments
> ----------------
>
> Refactored patch for master-6-17-stable branch
> https://reviews.apache.org/media/uploaded/files/2013/06/29/0001-CLOUDSTACK-3110-VMWARE-NPE-while-adding-primary-stor.patch
>
>
> Thanks,
>
> Venkata Siva Vijayendra Bhamidipati
>
>
Re: Review Request 12180: Fix NPE when adding invalid primary datastore
Posted by Prasanna Santhanam <ts...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12180/#review22563
-----------------------------------------------------------
engine/storage/volume/src/org/apache/cloudstack/storage/datastore/manager/PrimaryDataStoreProviderManagerImpl.java
<https://reviews.apache.org/r/12180/#comment46280>
This block should simply be:
if (dataStoreVO == null) {
throw new CloudRuntimeException("Unable to locate primary datastore with id " + dataStoreVO.getId());
}
String providerName = dataStoreVO.getStorageProviderName();
- Prasanna Santhanam
On June 29, 2013, 12:48 a.m., Venkata Siva Vijayendra Bhamidipati wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12180/
> -----------------------------------------------------------
>
> (Updated June 29, 2013, 12:48 a.m.)
>
>
> Review request for cloudstack, Chip Childers, Devdeep Singh, Kelven Yang, and Sateesh Chodapuneedi.
>
>
> Bugs: CLOUDSTACK-3110
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> Fixing an NPE when an attempt is made to add a primary datastore by providing an unreachable/nonexistent datastore/host.
>
>
> Diffs
> -----
>
> engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java b92f92f
> engine/storage/volume/src/org/apache/cloudstack/storage/datastore/manager/PrimaryDataStoreProviderManagerImpl.java 06b54e0
>
> Diff: https://reviews.apache.org/r/12180/diff/
>
>
> Testing
> -------
>
> With fix in place, an attempt to add an invalid primary datastore will fail with a GUI error dialog instead of failing silently with an NPE in the mgmt server log.
>
>
> File Attachments
> ----------------
>
> Refactored patch for master-6-17-stable branch
> https://reviews.apache.org/media/uploaded/files/2013/06/29/0001-CLOUDSTACK-3110-VMWARE-NPE-while-adding-primary-stor.patch
>
>
> Thanks,
>
> Venkata Siva Vijayendra Bhamidipati
>
>
Re: Review Request 12180: Fix NPE when adding invalid primary datastore
Posted by Chip Childers <ch...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12180/#review22715
-----------------------------------------------------------
Ship it!
applied to master and 4.2
- Chip Childers
On July 3, 2013, 12:25 a.m., Venkata Siva Vijayendra Bhamidipati wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12180/
> -----------------------------------------------------------
>
> (Updated July 3, 2013, 12:25 a.m.)
>
>
> Review request for cloudstack, Chip Childers, Devdeep Singh, Kelven Yang, and Sateesh Chodapuneedi.
>
>
> Bugs: CLOUDSTACK-3110
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> Fixing an NPE when an attempt is made to add a primary datastore by providing an unreachable/nonexistent datastore/host.
>
>
> Diffs
> -----
>
> engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java 71df262
> engine/storage/volume/src/org/apache/cloudstack/storage/datastore/manager/PrimaryDataStoreProviderManagerImpl.java 06b54e0
>
> Diff: https://reviews.apache.org/r/12180/diff/
>
>
> Testing
> -------
>
> With fix in place, an attempt to add an invalid primary datastore will fail with a GUI error dialog instead of failing silently with an NPE in the mgmt server log.
>
>
> File Attachments
> ----------------
>
> Refactored patch for master-6-17-stable branch
> https://reviews.apache.org/media/uploaded/files/2013/06/29/0001-CLOUDSTACK-3110-VMWARE-NPE-while-adding-primary-stor.patch
>
>
> Thanks,
>
> Venkata Siva Vijayendra Bhamidipati
>
>
Re: Review Request 12180: Fix NPE when adding invalid primary datastore
Posted by Venkata Siva Vijayendra Bhamidipati <vi...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12180/
-----------------------------------------------------------
(Updated July 3, 2013, 12:25 a.m.)
Review request for cloudstack, Chip Childers, Devdeep Singh, Kelven Yang, and Sateesh Chodapuneedi.
Changes
-------
Latest patch on top of master incorporating Sateesh and Prasanna's review comments.
Bugs: CLOUDSTACK-3110
Repository: cloudstack-git
Description
-------
Fixing an NPE when an attempt is made to add a primary datastore by providing an unreachable/nonexistent datastore/host.
Diffs (updated)
-----
engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java 71df262
engine/storage/volume/src/org/apache/cloudstack/storage/datastore/manager/PrimaryDataStoreProviderManagerImpl.java 06b54e0
Diff: https://reviews.apache.org/r/12180/diff/
Testing
-------
With fix in place, an attempt to add an invalid primary datastore will fail with a GUI error dialog instead of failing silently with an NPE in the mgmt server log.
File Attachments
----------------
Refactored patch for master-6-17-stable branch
https://reviews.apache.org/media/uploaded/files/2013/06/29/0001-CLOUDSTACK-3110-VMWARE-NPE-while-adding-primary-stor.patch
Thanks,
Venkata Siva Vijayendra Bhamidipati
Re: Review Request 12180: Fix NPE when adding invalid primary datastore
Posted by Venkata Siva Vijayendra Bhamidipati <vi...@citrix.com>.
> On June 29, 2013, 7:24 a.m., Sateesh Chodapuneedi wrote:
> > engine/storage/volume/src/org/apache/cloudstack/storage/datastore/manager/PrimaryDataStoreProviderManagerImpl.java, line 61
> > <https://reviews.apache.org/r/12180/diff/1/?file=313061#file313061line61>
> >
> > LGTM.
> > Can you also add datastore id in the log message. It's useful to know the datastore that is not found.
The datastore id getting passed here is the db id and not the uuid.. since it won't be found anyway, will it still be useful to put it in there? I have put it in in the latest patch, and this is how the error looks now:
ERROR [cloud.api.ApiServer] (839949122@qtp-1814078009-2:) unhandled exception executing api command: createStoragePool
com.cloud.utils.exception.CloudRuntimeException: Unable to locate datastore with id 3
- Venkata Siva Vijayendra
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12180/#review22562
-----------------------------------------------------------
On July 3, 2013, 12:25 a.m., Venkata Siva Vijayendra Bhamidipati wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12180/
> -----------------------------------------------------------
>
> (Updated July 3, 2013, 12:25 a.m.)
>
>
> Review request for cloudstack, Chip Childers, Devdeep Singh, Kelven Yang, and Sateesh Chodapuneedi.
>
>
> Bugs: CLOUDSTACK-3110
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> Fixing an NPE when an attempt is made to add a primary datastore by providing an unreachable/nonexistent datastore/host.
>
>
> Diffs
> -----
>
> engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java 71df262
> engine/storage/volume/src/org/apache/cloudstack/storage/datastore/manager/PrimaryDataStoreProviderManagerImpl.java 06b54e0
>
> Diff: https://reviews.apache.org/r/12180/diff/
>
>
> Testing
> -------
>
> With fix in place, an attempt to add an invalid primary datastore will fail with a GUI error dialog instead of failing silently with an NPE in the mgmt server log.
>
>
> File Attachments
> ----------------
>
> Refactored patch for master-6-17-stable branch
> https://reviews.apache.org/media/uploaded/files/2013/06/29/0001-CLOUDSTACK-3110-VMWARE-NPE-while-adding-primary-stor.patch
>
>
> Thanks,
>
> Venkata Siva Vijayendra Bhamidipati
>
>
Re: Review Request 12180: Fix NPE when adding invalid primary datastore
Posted by Sateesh Chodapuneedi <sa...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12180/#review22562
-----------------------------------------------------------
engine/storage/volume/src/org/apache/cloudstack/storage/datastore/manager/PrimaryDataStoreProviderManagerImpl.java
<https://reviews.apache.org/r/12180/#comment46279>
LGTM.
Can you also add datastore id in the log message. It's useful to know the datastore that is not found.
- Sateesh Chodapuneedi
On June 29, 2013, 12:48 a.m., Venkata Siva Vijayendra Bhamidipati wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12180/
> -----------------------------------------------------------
>
> (Updated June 29, 2013, 12:48 a.m.)
>
>
> Review request for cloudstack, Chip Childers, Devdeep Singh, Kelven Yang, and Sateesh Chodapuneedi.
>
>
> Bugs: CLOUDSTACK-3110
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> Fixing an NPE when an attempt is made to add a primary datastore by providing an unreachable/nonexistent datastore/host.
>
>
> Diffs
> -----
>
> engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java b92f92f
> engine/storage/volume/src/org/apache/cloudstack/storage/datastore/manager/PrimaryDataStoreProviderManagerImpl.java 06b54e0
>
> Diff: https://reviews.apache.org/r/12180/diff/
>
>
> Testing
> -------
>
> With fix in place, an attempt to add an invalid primary datastore will fail with a GUI error dialog instead of failing silently with an NPE in the mgmt server log.
>
>
> File Attachments
> ----------------
>
> Refactored patch for master-6-17-stable branch
> https://reviews.apache.org/media/uploaded/files/2013/06/29/0001-CLOUDSTACK-3110-VMWARE-NPE-while-adding-primary-stor.patch
>
>
> Thanks,
>
> Venkata Siva Vijayendra Bhamidipati
>
>
Re: Review Request 12180: Fix NPE when adding invalid primary datastore
Posted by Venkata Siva Vijayendra Bhamidipati <vi...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12180/
-----------------------------------------------------------
(Updated June 29, 2013, 12:48 a.m.)
Review request for cloudstack, Chip Childers, Devdeep Singh, Kelven Yang, and Sateesh Chodapuneedi.
Changes
-------
Attaching refactored patch for the master-6-17-stable branch.
Bugs: CLOUDSTACK-3110
Repository: cloudstack-git
Description
-------
Fixing an NPE when an attempt is made to add a primary datastore by providing an unreachable/nonexistent datastore/host.
Diffs
-----
engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java b92f92f
engine/storage/volume/src/org/apache/cloudstack/storage/datastore/manager/PrimaryDataStoreProviderManagerImpl.java 06b54e0
Diff: https://reviews.apache.org/r/12180/diff/
Testing
-------
With fix in place, an attempt to add an invalid primary datastore will fail with a GUI error dialog instead of failing silently with an NPE in the mgmt server log.
File Attachments (updated)
----------------
Refactored patch for master-6-17-stable branch
https://reviews.apache.org/media/uploaded/files/2013/06/29/0001-CLOUDSTACK-3110-VMWARE-NPE-while-adding-primary-stor.patch
Thanks,
Venkata Siva Vijayendra Bhamidipati