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

Revert "Bug 1888565: daemon: Explicitly start rpm-ostreed" #2296

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 0 additions & 4 deletions pkg/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,6 @@ func New(

// Only pull the osImageURL from OSTree when we are on RHCOS or FCOS
if os.IsCoreOSVariant() {
err := nodeUpdaterClient.Start()
if err != nil {
return nil, err
}
osImageURL, osVersion, err = nodeUpdaterClient.GetBootedOSImageURL()
if err != nil {
return nil, fmt.Errorf("error reading osImageURL from rpm-ostree: %v", err)
Expand Down
13 changes: 0 additions & 13 deletions pkg/daemon/rpm-ostree.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ type imageInspection struct {
// NodeUpdaterClient is an interface describing how to interact with the host
// around content deployment
type NodeUpdaterClient interface {
Start() error
GetStatus() (string, error)
GetBootedOSImageURL() (string, string, error)
Rebase(string, string) (bool, error)
Expand Down Expand Up @@ -100,18 +99,6 @@ func (r *RpmOstreeClient) GetBootedDeployment() (*RpmOstreeDeployment, error) {
return nil, fmt.Errorf("not currently booted in a deployment")
}

// Start ensures the daemon is running; the DBus activation timeout
// is shorter than the systemd timeout. xref
// https://bugzilla.redhat.com/show_bug.cgi?id=1888565#c3
func (r *RpmOstreeClient) Start() error {
_, err := runGetOut("systemctl", "start", "rpm-ostreed")
if err != nil {
return fmt.Errorf("failed to start rpm-ostreed: %v", err)
}

return nil
}

// GetStatus returns multi-line human-readable text describing system status
func (r *RpmOstreeClient) GetStatus() (string, error) {
output, err := runGetOut("rpm-ostree", "status")
Expand Down
5 changes: 0 additions & 5 deletions pkg/daemon/rpm-ostree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ func (r RpmOstreeClientMock) GetBootedOSImageURL() (string, string, error) {
return returnValues.OsImageURL, returnValues.Version, returnValues.Error
}

// Start is a mock
func (r RpmOstreeClientMock) Start() error {
return nil
}

// PullAndRebase is a mock
func (r RpmOstreeClientMock) Rebase(string, string) (bool, error) {
return false, nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ contents: |
After=machine-config-daemon-pull.service
Before=crio.service crio-wipe.service
Before=kubelet.service
Wants=rpm-ostreed.service

[Service]
Type=oneshot
Expand Down