Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: increasing log verbosity of creating logs so we can measure the start and end of creation for different resources #613

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pkg/providers/instance/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func (p *DefaultProvider) Delete(ctx context.Context, resourceName string) error
func (p *DefaultProvider) createAKSIdentifyingExtension(ctx context.Context, vmName string) (err error) {
vmExt := p.getAKSIdentifyingExtension()
vmExtName := *vmExt.Name
logging.FromContext(ctx).Debugf("Creating virtual machine AKS identifying extension for %s", vmName)
logging.FromContext(ctx).Infof("Creating virtual machine AKS identifying extension for %s", vmName)
v, err := createVirtualMachineExtension(ctx, p.azClient.virtualMachinesExtensionClient, p.resourceGroup, vmName, vmExtName, *vmExt)
if err != nil {
logging.FromContext(ctx).Errorf("Creating VM AKS identifying extension for VM %q failed, %w", vmName, err)
Expand All @@ -213,7 +213,7 @@ func (p *DefaultProvider) createAKSIdentifyingExtension(ctx context.Context, vmN
func (p *DefaultProvider) createCSExtension(ctx context.Context, vmName string, cse string, isWindows bool) (err error) {
vmExt := p.getCSExtension(cse, isWindows)
vmExtName := *vmExt.Name
logging.FromContext(ctx).Debugf("Creating virtual machine CSE for %s", vmName)
logging.FromContext(ctx).Infof("Creating virtual machine CSE for %s", vmName)
v, err := createVirtualMachineExtension(ctx, p.azClient.virtualMachinesExtensionClient, p.resourceGroup, vmName, vmExtName, *vmExt)
if err != nil {
logging.FromContext(ctx).Errorf("Creating VM CSE for VM %q failed, %w", vmName, err)
Expand Down Expand Up @@ -292,7 +292,7 @@ type createNICOptions struct {
func (p *DefaultProvider) createNetworkInterface(ctx context.Context, opts *createNICOptions) (string, error) {
nic := p.newNetworkInterfaceForVM(opts)
p.applyTemplateToNic(&nic, opts.LaunchTemplate)
logging.FromContext(ctx).Debugf("Creating network interface %s", opts.NICName)
logging.FromContext(ctx).Infof("Creating network interface %s", opts.NICName)
res, err := createNic(ctx, p.azClient.networkInterfacesClient, p.resourceGroup, opts.NICName, nic)
if err != nil {
return "", err
Expand Down Expand Up @@ -483,7 +483,7 @@ func (p *DefaultProvider) launchInstance(
useSIG := options.FromContext(ctx).UseSIG
vm := newVMObject(resourceName, nicReference, zone, capacityType, p.location, sshPublicKey, nodeIdentityIDs, nodeClass, launchTemplate, instanceType, p.provisionMode, useSIG)

logging.FromContext(ctx).Debugf("Creating virtual machine %s (%s)", resourceName, instanceType.Name)
logging.FromContext(ctx).Infof("Creating virtual machine %s (%s)", resourceName, instanceType.Name)
// Uses AZ Client to create a new virtual machine using the vm object we prepared earlier
resp, err := p.createVirtualMachine(ctx, vm, resourceName)
if err != nil {
Expand Down
Loading