Skip to content

Commit

Permalink
rename to be a bit more sensical and add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkowl committed Jul 8, 2024
1 parent 1e9a5af commit c2e5526
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion pkg/cluster/failurediagnostics/virtualmachines.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import (
"github.com/Azure/ARO-RP/pkg/util/stringutils"
)

func (m *manager) LogAzureInformation(ctx context.Context) (interface{}, error) {
// LogSerialConsoleVMLogs fetches the serial console from VMs and logs them with
// the associated VM name.
func (m *manager) LogSerialConsoleVMLogs(ctx context.Context) (interface{}, error) {
items := make([]interface{}, 0)

if m.virtualMachines == nil {
Expand Down
4 changes: 2 additions & 2 deletions pkg/cluster/failurediagnostics/virtualmachines_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
testlog "github.com/Azure/ARO-RP/test/util/log"
)

func TestVirtualMachines(t *testing.T) {
func TestVirtualMachinesSerialConsole(t *testing.T) {
const (
key = "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resourceGroup/providers/Microsoft.RedHatOpenShift/openShiftClusters/resourceName1"
clusterProfile = "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resourceGroupCluster"
Expand Down Expand Up @@ -150,7 +150,7 @@ func TestVirtualMachines(t *testing.T) {
virtualMachines: vmClient,
}

out, err := d.LogAzureInformation(ctx)
out, err := d.LogSerialConsoleVMLogs(ctx)
if err != nil {
t.Errorf("returned %s, should never return an error", err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/gatherlogs.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (m *manager) gatherFailureLogs(ctx context.Context) {
{f: m.logNodes, isJSON: true},
{f: m.logClusterOperators, isJSON: true},
{f: m.logIngressControllers, isJSON: true},
{f: d.LogAzureInformation, isJSON: false},
{f: d.LogSerialConsoleVMLogs, isJSON: false},
} {
o, err := f.f(ctx)
if err != nil {
Expand Down

0 comments on commit c2e5526

Please sign in to comment.