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

Marcus Sorensen commented on CLOUDSTACK-1789:
---------------------------------------------

Yes, the host is shown as in maintenance mode in the UI and database. We came 
across it because we wanted to avoid using one of our hosts in a test 
environment since it was being worked on, and suddenly new template deployments 
weren't working. It seems TemplateManagerImpl shouldn't be selecting a host in 
maintenance, even if AgentManagerImpl.easysend is supposed to complain.

Here in TemplateManagerImpl, we should probably verify that vos(0) isn't in 
maintenance, and if it is, pass over it to the next in list.

                Collections.shuffle(vos); // Shuffling to pick a random host in 
the vm deployment retries
                StoragePoolHostVO vo = vos.get(0);
                    if (s_logger.isDebugEnabled()) {
                        s_logger.debug("Downloading " + templateId + " via " + 
vo.getHostId());
                    }
                
> Unable to download templates to Primary Storage if a host is in maintenance
> ---------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-1789
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-1789
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: Storage Controller
>    Affects Versions: 4.1.0
>            Reporter: Marcus Sorensen
>            Assignee: Marcus Sorensen
>            Priority: Critical
>             Fix For: 4.1.0
>
>
> How to reproduce:
> 1. Set up a zone with two hosts
> 2. put one host in maintenance mode
> 3. register a new template
> 4. try to deploy VM with that template
> The management server may try to use the host in maintenance to download, and 
> if that fails, it marks the storage pool as unusable rather than trying the 
> host in service.
> 2013-03-22 11:48:22,448 DEBUG [cloud.storage.StorageManagerImpl] 
> (Job-Executor-10:job-203) Checking if we need to prepare 1 volumes for 
> VM[User|test2]
> 2013-03-22 11:48:22,456 DEBUG [cloud.storage.StorageManagerImpl] 
> (Job-Executor-10:job-203) Creating volume: Vol[68|vm=44|ROOT]
> 2013-03-22 11:48:22,456 DEBUG [cloud.storage.StorageManagerImpl] 
> (Job-Executor-10:job-203) Trying to create in Pool[204|BSSAN]
> 2013-03-22 11:48:22,471 DEBUG [cloud.template.TemplateManagerImpl] 
> (Job-Executor-10:job-203) Downloading template 208 to pool 204
> 2013-03-22 11:48:22,487 DEBUG [cloud.template.TemplateManagerImpl] 
> (Job-Executor-10:job-203) Downloading 208 via 6
> 2013-03-22 11:48:22,494 WARN  [agent.manager.AgentManagerImpl] 
> (Job-Executor-10:job-203) Resource 
> [Host:6] is unreachable: Host 6: Unable to send class 
> com.cloud.agent.api.storage.PrimaryStorageDownloadCommand because agent is in 
> maintenance mode
> 2013-03-22 11:48:22,494 DEBUG [cloud.template.TemplateManagerImpl] 
> (Job-Executor-10:job-203) Template 208 download to pool 204 failed due to 
> return null
> 2013-03-22 11:48:22,494 DEBUG [cloud.template.TemplateManagerImpl] 
> (Job-Executor-10:job-203) Downloading 208 via 6
> 2013-03-22 11:48:22,498 WARN  [agent.manager.AgentManagerImpl] 
> (Job-Executor-10:job-203) Resource [Host:6] is unreachable: Host 6: Unable to 
> send class com.cloud.agent.api.storage.PrimaryStorageDownloadCommand because 
> agent is in maintenance mode
> 2013-03-22 11:48:22,498 DEBUG [cloud.template.TemplateManagerImpl] 
> (Job-Executor-10:job-203) Template 208 download to pool 204 failed due to 
> return null
> 2013-03-22 11:48:22,499 DEBUG [cloud.template.TemplateManagerImpl] 
> (Job-Executor-10:job-203) Template 208 is not found on and can not be 
> downloaded to pool 204
> 2013-03-22 11:48:22,499 DEBUG [cloud.storage.StorageManagerImpl] 
> (Job-Executor-10:job-203) Cannot use this pool Pool[204|BSSAN] because we 
> can't propagate template 
> Tmpl[208-QCOW2-208-2-19c31559-8b3b-3434-9749-cca39f8bbfd7

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to