-
Notifications
You must be signed in to change notification settings - Fork 40
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
Self-assembling NTP Zone #2900
Self-assembling NTP Zone #2900
Conversation
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 had a few comments on the manifest and script, but mostly notes or ones you can take or leave (github doesn't seem to have a way to flag each one that way).
smf/ntp/method/svc-site-ntp
Outdated
ALL_LINKS=( $ALL_LINKS ) | ||
|
||
for LINK in "${ALL_LINKS[@]}"; do | ||
ipadm show-addr "$LINK/ll" || ipadm create-addr -t -T addrconf "$LINK/ll" | ||
done | ||
ipadm show-addr "$DATALINK/ll" || ipadm create-addr -t -T addrconf "$DATALINK/ll" | ||
ipadm show-addr "$DATALINK/omicron6" || ipadm create-addr -t -T static -a "$LISTEN_ADDR" "$DATALINK/omicron6" | ||
route get -inet6 default -inet6 "$GATEWAY" || route add -inet6 default -inet6 "$GATEWAY" |
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.
Usually things like this would only be done on service start and not on other methods such as stop and refresh, which will be run if somebody uses svcadm
or if chrony were to crash. Since they're all conditional there won't be a problem, so feel free to ignore.
smf/ntp/method/svc-site-ntp
Outdated
done | ||
ipadm show-addr "$DATALINK/ll" || ipadm create-addr -t -T addrconf "$DATALINK/ll" | ||
ipadm show-addr "$DATALINK/omicron6" || ipadm create-addr -t -T static -a "$LISTEN_ADDR" "$DATALINK/omicron6" | ||
route get -inet6 default -inet6 "$GATEWAY" || route add -inet6 default -inet6 "$GATEWAY" |
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.
route get -inet6 default -inet6 "$GATEWAY" || route add -inet6 default -inet6 "$GATEWAY" | |
route -n get -inet6 default "$GATEWAY" || route add -inet6 default "$GATEWAY" |
-n
so it does not try and resolve numbers to names, and the -inet6
flag was duplicated.
smf/ntp/method/svc-site-ntp
Outdated
ipadm show-addr "$LINK/ll" || ipadm create-addr -t -T addrconf "$LINK/ll" | ||
done | ||
ipadm show-addr "$DATALINK/ll" || ipadm create-addr -t -T addrconf "$DATALINK/ll" | ||
ipadm show-addr "$DATALINK/omicron6" || ipadm create-addr -t -T static -a "$LISTEN_ADDR" "$DATALINK/omicron6" |
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.
nit: over 80 columns
Boundary: $boundary | ||
Template: $template | ||
Config: $file | ||
NTP Service Configuration |
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 cat <<-
construct requires the body to be indented by tabs, not spaces.
It doesn't matter much as the output will just end up indented in the service log file.
illumos script style is tabs, 80 columns etc, and is what I'd used, but since this is in omicron that style probably takes precedence.
<propval name='gateway' type='astring' value='unknown' /> | ||
<propval name='listen_addr' type='astring' value='unknown' /> |
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.
These could be type='net_address_v6'
(assuming they are always IPv6 addresses)
smf/ntp/manifest/manifest.xml
Outdated
@@ -14,7 +14,7 @@ | |||
type="service" | |||
version="1"> | |||
|
|||
<create_default_instance enabled="false" /> | |||
<create_default_instance enabled='true' /> |
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.
If you're changing to single quotes here, perhaps make it consistent throughout?
Hey there! I'm taking over this bit of work from @smklein :) (spoke about this already) @citrus-it, I think I've addressed your comments, but so much has changed since your last review that it's probably a good idea to go over it again if you don't mind? 🤞 the integration tests pass after the giant merge. |
I'm not certain we still need the |
@davepacheco of course! This has been open for a while anyway. I'll be on stand-by then |
Superseded by: #5168 This PR was really far behind, it was easier to just open up a new one |
Fixes #2885