cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-8832) Update Nuage VSP plugin to work with Nuage VSP release 3.2
Date Wed, 14 Oct 2015 11:58:05 GMT

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

ASF GitHub Bot commented on CLOUDSTACK-8832:
--------------------------------------------

Github user nlivens commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/801#discussion_r41984374
  
    --- Diff: plugins/network-elements/nuage-vsp/src/com/cloud/network/guru/NuageVspGuestNetworkGuru.java
---
    @@ -322,35 +389,52 @@ public void shutdown(NetworkProfile profile, NetworkOffering offering)
{
     
         @Override
         public boolean trash(Network network, NetworkOffering offering) {
    -
    -        s_logger.debug("Handling trash() call back to delete the network " + network.getName()
+ " with uuid " + network.getUuid() + " from VSP");
    -        long domainId = network.getDomainId();
    -        Domain domain = _domainDao.findById(domainId);
    -        Long vpcId = network.getVpcId();
    -        String vpcUuid = null;
    -        if (vpcId != null) {
    -            Vpc vpcObj = _vpcDao.findById(vpcId);
    -            vpcUuid = vpcObj.getUuid();
    +        long networkId = network.getId();
    +        network = _networkDao.acquireInLockTable(networkId, 1200);
    +        if (network == null) {
    +            throw new ConcurrentOperationException("Unable to acquire lock on network
" + networkId);
             }
    +
             try {
    -            HostVO nuageVspHost = getNuageVspHost(network.getPhysicalNetworkId());
    -            TrashNetworkVspCommand cmd = new TrashNetworkVspCommand(domain.getUuid(),
network.getUuid(), isL3Network(offering.getId()), vpcUuid);
    -            TrashNetworkVspAnswer answer = (TrashNetworkVspAnswer)_agentMgr.easySend(nuageVspHost.getId(),
cmd);
    -            if (answer == null || !answer.getResult()) {
    -                s_logger.error("TrashNetworkNuageVspCommand for network " + network.getUuid()
+ " failed");
    -                if ((null != answer) && (null != answer.getDetails())) {
    -                    s_logger.error(answer.getDetails());
    +            if (s_logger.isDebugEnabled()) {
    +                s_logger.debug("Handling trash() call back to delete the network " +
network.getName() + " with uuid " + network.getUuid() + " from VSP");
    +            }
    +            long domainId = network.getDomainId();
    +            Domain domain = _domainDao.findById(domainId);
    +            boolean isL3Network = isL3Network(network);
    +            boolean isSharedNetwork = offering.getGuestType() == GuestType.Shared;
    +            Long vpcId = network.getVpcId();
    +            String vpcUuid = null;
    +            if (vpcId != null) {
    +                Vpc vpcObj = _vpcDao.findById(vpcId);
    +                vpcUuid = vpcObj.getUuid();
    +            }
    +
    +            String preConfiguredDomainTemplateName = NuageVspUtil.getPreConfiguredDomainTemplateName(_configDao,
network, offering);
    +            try {
    +                HostVO nuageVspHost = getNuageVspHost(network.getPhysicalNetworkId());
    +                TrashNetworkVspCommand.Builder cmdBuilder = new TrashNetworkVspCommand.Builder().domainUuid(domain.getUuid()).networkUuid(network.getUuid())
    +                        .isL3Network(isL3Network).isSharedNetwork(isSharedNetwork).vpcUuid(vpcUuid).domainTemplateName(preConfiguredDomainTemplateName);
    +                TrashNetworkVspAnswer answer = (TrashNetworkVspAnswer)_agentMgr.easySend(nuageVspHost.getId(),
cmdBuilder.build());
    +                if (answer == null || !answer.getResult()) {
    +                    s_logger.error("TrashNetworkNuageVspCommand for network " + network.getUuid()
+ " failed");
    +                    if ((null != answer) && (null != answer.getDetails())) {
    +                        s_logger.error(answer.getDetails());
    +                    }
                     }
    +            } catch (Exception e) {
    --- End diff --
    
    Removed the <code>try {} catch () {}</code> block since it didn't add any
value


> Update Nuage VSP plugin to work with Nuage VSP release 3.2
> ----------------------------------------------------------
>
>                 Key: CLOUDSTACK-8832
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8832
>             Project: CloudStack
>          Issue Type: Improvement
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Management Server
>    Affects Versions: 4.6.0
>            Reporter: Nick Livens
>            Assignee: Nick Livens
>         Attachments: nuageVspMarvinLogs.tar.gz
>
>
> Nuage VSP 3.2 is being released, we want to bring the plugin up to date for this release



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message