@@ -1272,7 +1272,7 @@ public DeleteHostAnswer deleteHost(HostVO host, boolean isForced, boolean isForc
12721272 @ Override
12731273 public HostVO findSecondaryStorageHost (long dcId ) {
12741274 SearchCriteriaService <HostVO , HostVO > sc = SearchCriteria2 .create (HostVO .class );
1275- sc .addAnd (sc .getEntity ().getType (), Op .EQ , Host .Type .SecondaryStorage );
1275+ sc .addAnd (sc .getEntity ().getType (), Op .IN , Host .Type .SecondaryStorage , Host . Type . SecondaryStorageVM );
12761276 sc .addAnd (sc .getEntity ().getDataCenterId (), Op .EQ , dcId );
12771277 List <HostVO > storageHosts = sc .list ();
12781278 if (storageHosts == null || storageHosts .size () < 1 ) {
@@ -1286,15 +1286,15 @@ public HostVO findSecondaryStorageHost(long dcId) {
12861286 @ Override
12871287 public List <HostVO > listSecondaryStorageHostsInAllZones () {
12881288 SearchCriteriaService <HostVO , HostVO > sc = SearchCriteria2 .create (HostVO .class );
1289- sc .addAnd (sc .getEntity ().getType (), Op .EQ , Host .Type .SecondaryStorage );
1289+ sc .addAnd (sc .getEntity ().getType (), Op .IN , Host .Type .SecondaryStorage , Host . Type . SecondaryStorageVM );
12901290 return sc .list ();
12911291 }
12921292
12931293 @ Override
12941294 public List <HostVO > listSecondaryStorageHostsInOneZone (long dataCenterId ) {
12951295 SearchCriteriaService <HostVO , HostVO > sc = SearchCriteria2 .create (HostVO .class );
12961296 sc .addAnd (sc .getEntity ().getDataCenterId (), Op .EQ , dataCenterId );
1297- sc .addAnd (sc .getEntity ().getType (), Op .EQ , Host .Type .SecondaryStorage );
1297+ sc .addAnd (sc .getEntity ().getType (), Op .IN , Host .Type .SecondaryStorage , Host . Type . SecondaryStorageVM );
12981298 return sc .list ();
12991299 }
13001300
@@ -1310,15 +1310,15 @@ public List<HostVO> listLocalSecondaryStorageHostsInOneZone(long dataCenterId) {
13101310 public List <HostVO > listAllTypesSecondaryStorageHostsInOneZone (long dataCenterId ) {
13111311 SearchCriteriaService <HostVO , HostVO > sc = SearchCriteria2 .create (HostVO .class );
13121312 sc .addAnd (sc .getEntity ().getDataCenterId (), Op .EQ , dataCenterId );
1313- sc .addAnd (sc .getEntity ().getType (), Op .IN , Host .Type .LocalSecondaryStorage , Host .Type .SecondaryStorage );
1313+ sc .addAnd (sc .getEntity ().getType (), Op .IN , Host .Type .LocalSecondaryStorage , Host .Type .SecondaryStorage , Host . Type . SecondaryStorageVM );
13141314 return sc .list ();
13151315 }
13161316
13171317 @ Override
1318- public List <HostVO > listUpSecondaryStorageVmHost (long dcId ) {
1318+ public List <HostVO > listUpAndConnectingSecondaryStorageVmHost (long dcId ) {
13191319 SearchCriteriaService <HostVO , HostVO > sc = SearchCriteria2 .create (HostVO .class );
13201320 sc .addAnd (sc .getEntity ().getDataCenterId (), Op .EQ , dcId );
1321- sc .addAnd (sc .getEntity ().getStatus (), Op .EQ , com .cloud .host .Status .Up );
1321+ sc .addAnd (sc .getEntity ().getStatus (), Op .IN , com .cloud .host .Status .Up , com . cloud . host . Status . Connecting );
13221322 sc .addAnd (sc .getEntity ().getType (), Op .EQ , Host .Type .SecondaryStorageVM );
13231323 return sc .list ();
13241324 }
@@ -1329,7 +1329,7 @@ public HostVO pickSsvmHost(HostVO ssHost) {
13291329 return ssHost ;
13301330 } else if ( ssHost .getType () == Host .Type .SecondaryStorage ) {
13311331 Long dcId = ssHost .getDataCenterId ();
1332- List <HostVO > ssAHosts = listUpSecondaryStorageVmHost (dcId );
1332+ List <HostVO > ssAHosts = listUpAndConnectingSecondaryStorageVmHost (dcId );
13331333 if (ssAHosts == null || ssAHosts .isEmpty () ) {
13341334 return null ;
13351335 }
0 commit comments