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.c...@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.sheph...@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 <ustcweiz...@gmail.com> wrote:
> >> Please check if you can
> >> create
> >>/var/cloudstack/mnt/secStorage/64d6e26f-e656-3ba3-908f-ce6610ede011,
> >> and mount nfs point.
>
>

Reply via email to