cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Min Chen <min.c...@citrix.com>
Subject Re: Sending to LocalHostEndpoint, Is there any resolution for this?
Date Thu, 31 Oct 2013 17:28:38 GMT
Yes, that is true, it is a bug in that case. The logic of choosing
endpoint to send Command will not work properly for destroying/Stopping VM
case. Our assumption is that registering template is done when ssvm is up
and running. Otherwise, it will send to LocalHost to execute command. In
your opinion, what should be expected behavior if user is trying to
register template when ssvm is crashed? Directly reporting error instead
of trying anything.

Thanks
-min 

On 10/31/13 10:18 AM, "Darren Shepherd" <darren.s.shepherd@gmail.com>
wrote:

>It's happening when I first create the zone.  I'll debug it further to
>tell
>you exactly what its happening.  But I don't understand how the following
>code in DefaultEndpointSelector could be correct.  If I have a zone, and I
>delete/stop/crash the SSVM, and at the same time register a new template,
>it seems the DownloadCommand will go to LocalHostEndPoint.
>
>    protected EndPoint findEndpointForImageStorage(DataStore store) {
>        Long dcId = null;
>        Scope storeScope = store.getScope();
>        if (storeScope.getScopeType() == ScopeType.ZONE) {
>            dcId = storeScope.getScopeId();
>        }
>        // find ssvm that can be used to download data to store. For
>zone-wide
>        // image store, use SSVM for that zone. For region-wide store,
>        // we can arbitrarily pick one ssvm to do that task
>        List<HostVO> ssAHosts =
>listUpAndConnectingSecondaryStorageVmHost(dcId);
>        if (ssAHosts == null || ssAHosts.isEmpty()) {
>            s_logger.info("No running ssvm is found, so command will be
>sent to LocalHostEndPoint");
>            return LocalHostEndpoint.getEndpoint(); // use local host as
>endpoint in
>            // case of no ssvm existing
>        }
>        Collections.shuffle(ssAHosts);
>        HostVO host = ssAHosts.get(0);
>        return RemoteHostEndPoint.getHypervisorHostEndPoint(host.getId(),
>host.getPrivateIpAddress(),
>                host.getPublicIpAddress());
>    }
>
>Darren
>
>
>On Thu, Oct 31, 2013 at 9:42 AM, Min Chen <min.chen@citrix.com> wrote:
>
>> Hi Darren,
>>
>>         The logic of sending command to Local in case of no SSVM is up
>>is
>> to
>> support S3 as secondary storage. In case of S3 as secondary storage,
>> system vm template is automatically downloaded to S3 when S3 is added
>>into
>> CloudStack, unlike NFS secondary storage case where we used a script to
>> pre-populate system vm template. The thing I don't get is: what scenario
>> are you trying to do to trigger DownloadCommand when SSVM is not up?
>>
>>         Thanks
>>         -min
>>
>> On 10/31/13 9:32 AM, "Darren Shepherd" <darren.s.shepherd@gmail.com>
>> wrote:
>>
>> >No, that's not the problem.  The problem is that the DownloadCommand
>> >is supposed to go to the SSVM, but it sending it to the
>> >LocalHostEndPoint which is the mgmt server.  So the mgmt server can
>> >not create /var/cloudstack/mnt/
>> >secStorage/64d6e26f-e656-3ba3-908f-ce6610ede011.  I have my mgmt setup
>> >so that it does not have sudo access.  A standard cloudstack install
>> >has sudo access so it will create those folders and mount on the mgmt
>> >server, but it shouldn't.
>> >
>> >Please don't tell me we made a change so that the mgmt server is
>> >expected to have NFS access to all secondary storages.
>> >
>> >Darren
>> >
>> >On Thu, Oct 31, 2013 at 8:54 AM, Wei ZHOU <ustcweizhou@gmail.com>
>>wrote:
>> >> Please check if you can
>> >> create
>> >>/var/cloudstack/mnt/secStorage/64d6e26f-e656-3ba3-908f-ce6610ede011,
>> >> and mount nfs point.
>>
>>


Mime
View raw message