Skip to content

Commit

Permalink
Merge pull request #5 from prachidamle/log_changes
Browse files Browse the repository at this point in the history
Log changes
  • Loading branch information
prachidamle committed Apr 28, 2016
2 parents 2b48f77 + 996cdd6 commit 2892e51
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func main() {
version = newVersion
update = true
} else {
logrus.Debugf("No changes in metadata version: %s", newVersion)
//logrus.Debugf("No changes in metadata version: %s", newVersion)
if time.Since(lastUpdated).Minutes() >= forceUpdateInterval {
logrus.Debugf("Executing force update as metadata version hasn't been changed in: %v minutes", forceUpdateInterval)
update = true
Expand All @@ -100,15 +100,15 @@ func main() {

if update {
// get records from metadata
logrus.Debugf("Reading metadata LB Configs")

metadataLBConfigs, err := m.GetMetadataLBConfigs(lbEndpointServiceLabel, targetRancherSuffix)
if err != nil {
logrus.Errorf("Error reading metadata lb entries: %v", err)
}
logrus.Debugf("LB configs from metadata: %v", metadataLBConfigs)

/*update provider*/
logrus.Debugf("Reading Provider LB Configs")

err = UpdateProviderLBConfigs(metadataLBConfigs)
if err != nil {
logrus.Errorf("Error reading provider lb entries: %v", err)
Expand Down
2 changes: 1 addition & 1 deletion metadata/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (m *MetadataClient) GetMetadataLBConfigs(lbEndpointServiceLabel string, tar
continue
}

logrus.Debugf("LB label exists for service : %v", service)
logrus.Debugf("LB label exists for service : %v", service.Name)
lbConfig := model.LBConfig{}
lbConfig.LBEndpoint = lb_endpoint
lbConfig.LBTargetPoolName = service.Name + "_" + m.EnvironmentUUID + "_" + targetRancherSuffix
Expand Down
5 changes: 1 addition & 4 deletions providers/f5/f5_bigip.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,13 +305,10 @@ func (*F5BigIPHandler) TestConnection() error {
return checkF5Connection()
}


func checkF5Connection() error {
_, err := client.Pools()
if err != nil {
logrus.Errorf("f5 TestConnection: Error listing f5 pool: %v\n", err)
} else {
logrus.Infof("f5 TestConnection check passed")
}
return err
}
}

0 comments on commit 2892e51

Please sign in to comment.