-
Notifications
You must be signed in to change notification settings - Fork 42
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
feat: Add supports for dual-stack #81
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## main #81 +/- ##
==========================================
+ Coverage 34.78% 34.89% +0.11%
==========================================
Files 6 6
Lines 1912 1917 +5
==========================================
+ Hits 665 669 +4
Misses 1143 1143
- Partials 104 105 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
samples/ubuntu-dual-stack.yaml
Outdated
ssh_pwauth: True | ||
runcmd: | ||
- dhclient -6 ens4 | ||
# TODO: use networkData to configure DHCPv6, but currently only works for DHCPv4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a limitation of cloud-init?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, but still trying to figure it out.
} | ||
} | ||
|
||
func setRADLog() (*os.File, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's better to use a log lib that supports file truncate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok,i'll use a lib to deal the log message.
4b04033
to
46c2728
Compare
return nil, fmt.Errorf("failed to discovery neighbor MAC. Try %d times", retry) | ||
} | ||
|
||
func discoveryNeighborMAC(ifaceName string, ip net.IP) (net.HardwareAddr, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The func name should be discoverXXX
"path/filepath" | ||
"time" | ||
|
||
"github.com/jcelliott/lumber" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason we choose this log lib? It doesn't seem to have many stars
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a little few log libs support rotation, this lib was imported by most users. However, it doesn't seem active and thread-safe.
Any suggestions? Or just use the built-in log without rotation beacase i have removed periodical logs that would cause the size of the log file to grow rapidly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a process in a container, it's better we log to console
3616f37
to
25c6e57
Compare
45c6069
to
5708542
Compare
5708542
to
cde8228
Compare
No description provided.