cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CLOUDSTACK-9280) System VM volumes cannot be deleted when there are no system VMs
Date Mon, 17 Oct 2016 14:01:58 GMT


ASF GitHub Bot commented on CLOUDSTACK-9280:

Github user GabrielBrascher commented on a diff in the pull request:
    --- Diff: engine/storage/test/org/apache/cloudstack/storage/endpoint/
    @@ -0,0 +1,167 @@
    +// 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
    +// Unless required by applicable law or agreed to in writing,
    +// software distributed under the License is distributed on an
    +// KIND, either express or implied.  See the License for the
    +// specific language governing permissions and limitations
    +// under the License.
    +import static org.mockito.Matchers.any;
    +import static org.mockito.Matchers.eq;
    +import static org.mockito.Mockito.doReturn;
    +import static org.mockito.Mockito.mock;
    +import static org.mockito.Mockito.when;
    +import java.util.ArrayList;
    +import java.util.List;
    +import org.junit.Assert;
    +import org.junit.Test;
    +import org.junit.runner.RunWith;
    +import org.mockito.InjectMocks;
    +import org.mockito.Mock;
    +import org.mockito.Spy;
    +import org.powermock.api.mockito.PowerMockito;
    +import org.powermock.core.classloader.annotations.PrepareForTest;
    +import org.powermock.modules.junit4.PowerMockRunner;
    +public class DefaultEndPointSelectorTest {
    +    @Mock
    +    HostDao _hostDao;
    +    @Mock
    +    SecondaryStorageVmDao _ssvmDao;
    +    @InjectMocks
    +    @Spy
    +    DefaultEndPointSelector selector = new DefaultEndPointSelector();
    +    //Special mocked endpoints that the tests can use to identify what was returned from
the method.
    +    private EndPoint selectMethodEndpoint = mock(EndPoint.class);
    +    private DummyEndpoint dummyEndpoint = mock(DummyEndpoint.class);
    +    /**
    +     * The single common method that sets up the mocks to cover all possible scenarios
we want to
    +     * test. The VM type and volume state are passed in, while a potential list of existing
    +     * are also passed in. As its final action, the method calls {@link DefaultEndPointSelector#select(DataObject,
    +     * in order to test the method's operation and returns the endpoint found.
    +     *
    +     * @param vmType - State of the VM attached to the volume
    +     * @param volumeState - State of the volume
    +     * @param ssvmVOs - A list of SSVMs to return from the DAO
    +     * @return The selected endpoint.
    +     */
    +    public EndPoint mockEndpointSelection(Type vmType, State volumeState, SecondaryStorageVmVO
... ssvmVOs) {
    --- End diff --
    This method could be private. Did I missed something?

> System VM volumes cannot be deleted when there are no system VMs
> ----------------------------------------------------------------
>                 Key: CLOUDSTACK-9280
>                 URL:
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Management Server
>    Affects Versions: 4.6.0, 4.7.0
>            Reporter: Jeff Hair
> Scenario: When deleting a zone, everything under it must be removed. This results in
the system VMs being destroyed as there are no more hosts running.
> The storage cleanup thread properly detects that there are volumes to be deleted, but
it cannot delete them because the endpoint selection fails with "No remote endpoint to send
DeleteCommand, check if host or ssvm is down?"

This message was sent by Atlassian JIRA

View raw message