Skip to content

sources/azure: drop unused case in _report_failure()#1200

Merged
TheRealFalcon merged 1 commit into
canonical:mainfrom
cjp256:azure-report-failure-drop-unused-case
Jan 20, 2022
Merged

sources/azure: drop unused case in _report_failure()#1200
TheRealFalcon merged 1 commit into
canonical:mainfrom
cjp256:azure-report-failure-drop-unused-case

Conversation

@cjp256
Copy link
Copy Markdown
Contributor

@cjp256 cjp256 commented Jan 19, 2022

According to the documentation in the tests:

We expect 3 calls to report_failure_to_fabric,
because we try 3 different methods of calling report failure.
The different methods are attempted in the following order:
1. Using cached ephemeral dhcp context to report failure to Azure
2. Using new ephemeral dhcp to report failure to Azure
3. Using fallback lease to report failure to Azure

Case 1 and 2 make sense. If networking is established, use it.
Should failure occur using current network configuration, retry
with fresh DHCP.

Case 3 suggests that we can fall back to a lease file and retry.

Given that:

  1. The wireserver address has never changed to date.
  2. The wireserver address should be in the DHCP lease.
  3. Parsing the lease file does not improve connectivity over the
    prior attempts.

...we can safely remove this case without regression.

Signed-off-by: Chris Patterson cpatterson@microsoft.com

According to the documentation in the tests:

```
We expect 3 calls to report_failure_to_fabric,
because we try 3 different methods of calling report failure.
The different methods are attempted in the following order:
1. Using cached ephemeral dhcp context to report failure to Azure
2. Using new ephemeral dhcp to report failure to Azure
3. Using fallback lease to report failure to Azure
```

Case 1 and 2 make sense.  If networking is established, use it.
Should failure occur using current network configuration, retry
with fresh DHCP.

Case 3 suggests that we can fall back to a lease file and retry.

Given that:

1. The wireserver address has never changed to date.
2. The wireserver address should be in the DHCP lease.
3. Parsing the lease file does not improve connectivity over the
   prior attempts.

...we can safely remove this case without regression.

Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
Copy link
Copy Markdown
Contributor

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@TheRealFalcon TheRealFalcon merged commit 6f0e881 into canonical:main Jan 20, 2022
@cjp256 cjp256 deleted the azure-report-failure-drop-unused-case branch April 25, 2022 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants