Skip to content

Commit

Permalink
Issue #958: Set proxy in machine.Status
Browse files Browse the repository at this point in the history
machine.Status() has the same issue as the one which was recently fixed
in machine.Start(). It never adds `.testing` to the `no_proxy`
environment variable, which is going to cause failures when using `crc
status` in an environment using a proxy.

This fixes #958
  • Loading branch information
cfergeau authored and praveenkumar committed Jan 24, 2020
1 parent a6f82c7 commit c3cc33d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/crc/machine/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,18 @@ func Status(statusConfig ClusterStatusConfig) (ClusterStatusResult, error) {
}

if IsRunning(vmStatus) {
_, crcBundleMetadata, err := getBundleMetadataFromDriver(host.Driver)
if err != nil {
result.Error = err.Error()
return *result, errors.Newf("Error loading bundle metadata: %v", err)
}
proxyConfig, err := getProxyConfig(crcBundleMetadata.ClusterInfo.BaseDomain)
if err != nil {
result.Error = err.Error()
return *result, errors.Newf("Error getting proxy configuration: %v", err)
}
proxyConfig.ApplyToEnvironment()

// check if all the clusteroperators are running
ocConfig := oc.UseOCWithConfig(statusConfig.Name)
operatorsRunning, err := oc.GetClusterOperatorStatus(ocConfig)
Expand Down

0 comments on commit c3cc33d

Please sign in to comment.