Skip to content

Commit

Permalink
Merge pull request #2763 from subutai-io/dev
Browse files Browse the repository at this point in the history
Dev -> Master
  • Loading branch information
Dilshat authored Dec 13, 2018
2 parents 9c9875f + 8dd1fff commit 9e006b1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import org.apache.commons.lang3.StringUtils;

import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;

Expand Down Expand Up @@ -198,20 +197,16 @@ public synchronized void queueRequest( final RequestedHost requestedHost ) throw
if ( requestedHostImpl != null )
{
LOG.info( "Already requested registration" );
//todo may be for issue 2749 just remove and readd request? sync with other methods

//update hostname
requestedHostImpl.setHostname( requestedHost.getHostname() );

if ( !Strings.isNullOrEmpty( requestedHost.getHostname() ) && !requestedHostImpl.getHostname()
.equalsIgnoreCase(
requestedHost
.getHostname() ) )
{
requestedHostImpl.setHostname( requestedHost.getHostname() );
}

//update containers
requestedHostImpl.setHostInfos( requestedHost.getHostInfos() );

//update ip
requestedHostImpl.setAddress( requestedHost.getAddress() );

requestedHostImpl.refreshDateUpdated();

requestDataService.update( requestedHostImpl );
Expand Down Expand Up @@ -465,8 +460,12 @@ public void onHeartbeat( final ResourceHostInfo resourceHostInfo, final Set<Quot

if ( registrationRequest != null )
{
//update hostname
registrationRequest.setHostname( resourceHostInfo.getHostname() );

//update ip
registrationRequest.setAddress( resourceHostInfo.getAddress() );

requestDataService.update( registrationRequest );
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ public void setHostname( final String hostname )
}


public void setAddress( final String address )
{
this.address = address;
}


@Override
public HostArchitecture getArch()
{
Expand Down

0 comments on commit 9e006b1

Please sign in to comment.