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

ASF GitHub Bot commented on CLOUDSTACK-9827:
--------------------------------------------

Github user rafaelweingartner commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1994#discussion_r105959827
  
    --- Diff: 
engine/schema/test/com/cloud/storage/dao/StoragePoolTagsDaoImplTest.java ---
    @@ -0,0 +1,105 @@
    +// Licensed to the Apache Software Foundation (ASF) under one
    +// or more contributor license agreements.  See the NOTICE file
    +// distributed with this work for additional information
    +// regarding copyright ownership.  The ASF licenses this file
    +// to you under the Apache License, Version 2.0 (the
    +// "License"); you may not use this file except in compliance
    +// with the License.  You may obtain a copy of the License at
    +//
    +//   http://www.apache.org/licenses/LICENSE-2.0
    +//
    +// Unless required by applicable law or agreed to in writing,
    +// software distributed under the License is distributed on an
    +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +// KIND, either express or implied.  See the License for the
    +// specific language governing permissions and limitations
    +// under the License.
    +package com.cloud.storage.dao;
    +
    +import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
    +import org.junit.Before;
    +import org.junit.Test;
    +import org.junit.runner.RunWith;
    +import org.mockito.InjectMocks;
    +import org.mockito.Matchers;
    +import org.mockito.Mock;
    +import org.mockito.Spy;
    +import org.powermock.modules.junit4.PowerMockRunner;
    +
    +import com.cloud.storage.StoragePoolTagVO;
    +import com.cloud.utils.db.Filter;
    +import com.cloud.utils.db.SearchBuilder;
    +import com.cloud.utils.db.SearchCriteria;
    +
    +import static org.mockito.Mockito.when;
    +import static org.mockito.Mockito.doReturn;
    +import static org.mockito.Mockito.verify;
    +
    +import java.util.ArrayList;
    +import java.util.Arrays;
    +import java.util.List;
    +
    +import junit.framework.TestCase;
    +
    +@RunWith(PowerMockRunner.class)
    +public class StoragePoolTagsDaoImplTest extends TestCase {
    +
    +    @Mock
    +    ConfigurationDao _configDao;
    +    @Mock
    +    SearchBuilder<StoragePoolTagVO> StoragePoolIdsSearch;
    +
    +    @Spy
    +    @InjectMocks
    +    private StoragePoolTagsDaoImpl _storagePoolTagsDaoImpl = new 
StoragePoolTagsDaoImpl();
    +
    +    @Mock
    +    static StoragePoolTagVO storagePoolTag1;
    --- End diff --
    
    I am curious here, is there any reason to declare the variables here 
`static`?


> Storage tags stored in multiple places
> --------------------------------------
>
>                 Key: CLOUDSTACK-9827
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9827
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: Management Server
>    Affects Versions: 4.10.0.0
>         Environment: N/A
>            Reporter: Mike Tutkowski
>            Assignee: Nicolas Vazquez
>            Priority: Blocker
>             Fix For: 4.10.0.0
>
>
> I marked this as a Blocker because it concerns me that we are not handling 
> storage tags correctly in 4.10 and, as such, VM storage might get placed in 
> locations that users don't want.
> From e-mails I sent to dev@ (most recent to oldest):
> If I add a new primary storage and give it a storage tag, the tag ends up in 
> storage_pool_details.
> If I edit an existing storage pool’s storage tags, it places them in 
> storage_pool_tags.
> **********
> I believe I have found another bug (one that we should either fix or examine 
> in detail before releasing 4.10).
> It looks like we have a new table: cloud.storage_pool_tags.
> The addition of this table seems to have broken the listStorageTags API 
> command. When this command runs, it doesn’t pick up any storage tags for me 
> (and I know I have one storage tag).
> This data used to be stored in the cloud.storage_pool_details table. It’s 
> good to put it in its own table, but will our upgrade process move the 
> existing tags from storage_pool_details to storage_pool_tags?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to