Skip to content

Commit

Permalink
WIP: Trying to figure out Windows failures
Browse files Browse the repository at this point in the history
  • Loading branch information
mook-as committed Dec 18, 2024
1 parent d77f596 commit 50a88bb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
16 changes: 10 additions & 6 deletions pkg/rancher-desktop/backend/wsl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1588,12 +1588,16 @@ export default class WSLBackend extends events.EventEmitter implements VMBackend

await this.progressTracker.action('Shutting Down...', 10, async() => {
if (await this.isDistroRegistered({ runningOnly: true })) {
await this.stopService('k3s');
await this.stopService('docker');
await this.stopService('containerd');
await this.stopService('rd-openresty');
await this.stopService('rancher-desktop-guestagent');
await this.stopService('buildkitd');
const services = ['k3s', 'docker', 'containerd', 'rd-openresty',
'rancher-desktop-guestagent', 'buildkitd'];

Check warning on line 1592 in pkg/rancher-desktop/backend/wsl.ts

View workflow job for this annotation

GitHub Actions / test

Expected indentation of 12 spaces but found 28

Check warning on line 1592 in pkg/rancher-desktop/backend/wsl.ts

View workflow job for this annotation

GitHub Actions / lint (macos-latest)

Expected indentation of 12 spaces but found 28
for (const service of services) {

Check warning on line 1593 in pkg/rancher-desktop/backend/wsl.ts

View workflow job for this annotation

GitHub Actions / test

Expected blank line before this statement

Check warning on line 1593 in pkg/rancher-desktop/backend/wsl.ts

View workflow job for this annotation

GitHub Actions / lint (macos-latest)

Expected blank line before this statement
try {
await this.stopService(service);
} catch (ex) {
// Do not allow errors here to prevent us from stopping.
console.error(`Failed to stop service ${ service }:`, ex)

Check warning on line 1598 in pkg/rancher-desktop/backend/wsl.ts

View workflow job for this annotation

GitHub Actions / test

Missing semicolon

Check warning on line 1598 in pkg/rancher-desktop/backend/wsl.ts

View workflow job for this annotation

GitHub Actions / lint (macos-latest)

Missing semicolon
}
}
try {
await this.stopService('local');
} catch (ex) {
Expand Down
10 changes: 9 additions & 1 deletion src/go/networking/cmd/network/setup_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ func main() {
defer cleanupVethLink(originNS)

if err := configureVethPair(namespaceVeth, namespaceVethIP); err != nil {
linkList, err2 := netlink.LinkList()
if err2 != nil {
logrus.Errorf("failed to get links: %s", err2)
} else {
logrus.Infof("link list: %+v", linkList)
}
logrus.Fatalf("failed setting up veth: %s for rancher desktop namespace: %v", namespaceVeth, err)
}

Expand All @@ -144,13 +150,15 @@ func main() {
logrus.Fatalf("failed to switch back to original namespace: %v", err)
}
if err := configureVethPair(WSLVeth, WSLVethIP); err != nil {
logrus.Fatalf("failed setting up veth: %s for rancher desktop namespace: %v", WSLVeth, err)
logrus.Fatalf("failed setting up veth: %s for default namespace: %v", WSLVeth, err)
}

if err := originNS.Close(); err != nil {
logrus.Errorf("failed to close original NS, ignoring error: %v", err)
}

logrus.Trace("Network setup complete, waiting for vm-switch")

if err := vmSwitchCmd.Wait(); err != nil {
logrus.Errorf("vm-switch exited with error: %v", err)
}
Expand Down

0 comments on commit 50a88bb

Please sign in to comment.