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

Daemon redesign - using controller-runtime #788

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ contents: |

[Service]
Type=oneshot
ExecStart=/var/lib/sriov/sriov-network-config-daemon -v 2 --zap-log-level 2 service --phase post
ExecStart=/var/lib/sriov/sriov-network-config-daemon service --phase post
StandardOutput=journal+console

[Install]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ contents: |

[Service]
Type=oneshot
ExecStart=/var/lib/sriov/sriov-network-config-daemon -v 2 --zap-log-level 2 service --phase pre
ExecStart=/var/lib/sriov/sriov-network-config-daemon service --phase pre
StandardOutput=journal+console

[Install]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:

[Service]
Type=oneshot
ExecStart=/var/lib/sriov/sriov-network-config-daemon service -v {{ .LogLevel }} --zap-log-level {{ .LogLevel }} --phase pre
ExecStart=/var/lib/sriov/sriov-network-config-daemon service --phase pre
StandardOutput=journal+console

[Install]
Expand All @@ -38,7 +38,7 @@ spec:

[Service]
Type=oneshot
ExecStart=/var/lib/sriov/sriov-network-config-daemon service -v {{ .LogLevel }} --zap-log-level {{ .LogLevel }} --phase post
ExecStart=/var/lib/sriov/sriov-network-config-daemon service --phase post
StandardOutput=journal+console

[Install]
Expand Down
3 changes: 2 additions & 1 deletion cmd/sriov-network-config-daemon/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func runServiceCmd(cmd *cobra.Command, args []string) error {
}
// init logger
snolog.InitLog()
snolog.SetLogLevel(2)
setupLog := log.Log.WithName("sriov-config-service").WithValues("phase", phaseArg)

setupLog.V(0).Info("Starting sriov-config-service", "version", version.Version)
Expand Down Expand Up @@ -168,7 +169,7 @@ func phasePre(setupLog logr.Logger, conf *systemd.SriovConfig, hostHelpers helpe

func phasePost(setupLog logr.Logger, conf *systemd.SriovConfig, hostHelpers helper.HostHelpersInterface) error {
setupLog.V(0).Info("check result of the Pre phase")
prePhaseResult, err := systemd.ReadSriovResult()
prePhaseResult, _, err := systemd.ReadSriovResult()
if err != nil {
return fmt.Errorf("failed to read result of the pre phase: %v", err)
}
Expand Down
Loading
Loading