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

dhcp: T6998: Make dhcp lease datetime timezone aware #4319

Merged
merged 2 commits into from
Jan 27, 2025

Conversation

indrajitr
Copy link
Contributor

Change summary

This resurrects part of the fixes from PR #4277. They were approved but never rebased and applied.

In this PR:

  • Cherry-picked bf2b73a
  • Removed vestigial method _utc_to_local since it isn't used anywhere
  • Renamed variables and reformatted

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

https://vyos.dev/T6998

Related PR(s)

#4277

How to test / Smoketest result

Before:

vyos@test-0122:~$ show dhcp server leases sort ip
IP Address    MAC address        State    Lease start          Lease expiration     Remaining                Pool    Hostname                     Origin
------------  -----------------  -------  -------------------  -------------------  -----------------------  ------  ---------------------------  --------
10.10.1.9     80:aa:bb:cc:dd:ee  active   2025-01-25 20:25:54  2025-01-26 20:25:54  13:48:03                 LAN1    ngap                         local
10.10.2.2     a6:aa:bb:cc:dd:ee  active   2025-01-25 11:23:18  2025-01-26 11:23:18  4:45:27                  LAN2    watch                        local
10.10.2.3     7a:aa:bb:cc:dd:ee  active   2025-01-25 19:56:42  2025-01-26 19:56:42  13:18:51                 LAN2    phone                        local

After:

vyos@test-0122:~$ show dhcp server leases sort ip
IP Address    MAC address        State    Lease start                Lease expiration           Remaining    Pool    Hostname                     Origin
------------  -----------------  -------  -------------------------  -------------------------  -----------  ------  ---------------------------  --------
10.10.1.9     80:aa:bb:cc:dd:ee  active   2025-01-26 08:25:54+00:00  2025-01-27 08:25:54+00:00  13:40:25     LAN1    ngap                         local
10.10.2.2     a6:35:47:2b:07:11  active   2025-01-25 23:23:18+00:00  2025-01-26 23:23:18+00:00  4:37:49      LAN2    watch                        local
10.10.2.3     7a:4a:66:d9:af:80  active   2025-01-26 07:56:42+00:00  2025-01-27 07:56:42+00:00  13:11:13     LAN2    phone                        local

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

Copy link

👍
No issues in PR Title / Commit Title

Copy link

CI integration 👍 passed!

Details

CI logs

  • CLI Smoketests (no interfaces) 👍 passed
  • CLI Smoketests (interfaces only) 👍 passed
  • Config tests 👍 passed
  • RAID1 tests 👍 passed
  • TPM tests 👍 passed

@dmbaturin dmbaturin merged commit cbe364a into vyos:current Jan 27, 2025
14 checks passed
@indrajitr indrajitr deleted the vyos-t6998-retry branch January 27, 2025 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

4 participants