[ https://issues.apache.org/jira/browse/CLOUDSTACK-9509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15526413#comment-15526413 ]
ASF GitHub Bot commented on CLOUDSTACK-9509: -------------------------------------------- Github user jburwell commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1694#discussion_r80714655 --- Diff: server/test/com/cloud/storage/listener/StoragePoolMonitorTest.java --- @@ -0,0 +1,80 @@ +// 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.listener; + +import com.cloud.agent.api.StartupRoutingCommand; +import com.cloud.exception.ConnectionException; +import com.cloud.exception.StorageUnavailableException; +import com.cloud.host.HostVO; +import com.cloud.hypervisor.Hypervisor; +import com.cloud.storage.ScopeType; +import com.cloud.storage.StorageManagerImpl; +import com.cloud.storage.StoragePoolStatus; +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mockito; + +import java.util.Collections; + +public class StoragePoolMonitorTest { + + private StorageManagerImpl storageManager; + private PrimaryDataStoreDao poolDao; + private StoragePoolMonitor storagePoolMonitor; + private HostVO host; + private StoragePoolVO pool; + private StartupRoutingCommand cmd; + + @Before + public void setUp() throws Exception { + storageManager = Mockito.mock(StorageManagerImpl.class); + poolDao = Mockito.mock(PrimaryDataStoreDao.class); + + storagePoolMonitor = new StoragePoolMonitor(storageManager, poolDao); + host = new HostVO("some-uuid"); --- End diff -- Why not pass in `UUID.randomUUID().toString()`? > KVM Hosts connect with no storage > --------------------------------- > > Key: CLOUDSTACK-9509 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9509 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Reporter: Rohit Yadav > Assignee: Rohit Yadav > Priority: Critical > Fix For: 4.8.1, 4.10.0.0, 4.9.1.0 > > > KVM hosts on shared storage failure was accepted by mgmt server with the > host state as Up, even though there was no primary/shared storage available > on it. They fail the ModifyStoragePoolCommand, but the management server > continues on with adding SSH keys and marking them as up. -- This message was sent by Atlassian JIRA (v6.3.4#6332)