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

Don't use docker shim if only using a mounted docker.sock instead of docker-in-docker #67

Conversation

Hoverbear
Copy link
Contributor

Description

I believe this fixes #65.

Checklist
  • Tested changes against a test repository
  • Added or updated relevant documentation (leave unchecked if not applicable)
  • (If this PR is for a release) Updated README to point to the new tag (leave unchecked if not applicable)

@Hoverbear Hoverbear self-assigned this Jan 10, 2024
@Hoverbear Hoverbear requested a review from cole-h January 10, 2024 19:45
Copy link
Member

@cole-h cole-h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks sound overall, but I'm not extremely familiar with docker or cgroups and the like, so take this approval with a grain of salt...

}

const cgroups = cgroups_buffer.trim().split("\n");
const last_cgroup = cgroups[cgroups.length - 1];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be worth it to check every cgroup line to see if there is /docker/ in it, or if it's in an earlier cgroup, is that a weird configuration we wouldn't want to support anyways?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have access to every system and setup, only a few, but I think in this case we're only looking for the 0:: prefixed line which is always last.

Copy link
Member

@colemickens colemickens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also no cgroup expert, but the code matches what was described, and the description I was given sounded convincing for detecting this scenario and avoiding it.

@Hoverbear Hoverbear merged commit e279ba5 into main Jan 11, 2024
5 checks passed
@Hoverbear Hoverbear deleted the hoverbear/fh-161-after-running-in-act-hosts-nix-daemon-is-unusable branch January 11, 2024 15:55
mmlb added a commit to packethost/packet-networking that referenced this pull request Mar 18, 2024
… v10 (#82)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [DeterminateSystems/nix-installer-action](https://github.com/DeterminateSystems/nix-installer-action) | action | major | `v9` -> `v10` |

---

### Release Notes

<details>
<summary>DeterminateSystems/nix-installer-action (DeterminateSystems/nix-installer-action)</summary>

### [`v10`](https://github.com/DeterminateSystems/nix-installer-action/releases/tag/v10)

[Compare Source](https://github.com/DeterminateSystems/nix-installer-action/compare/v9...v10)

##### What's Changed

-   action: post-run-job: try clean daemon container, warn on failure by [@&#8203;colemickens](https://github.com/colemickens) in [DeterminateSystems/nix-installer-action#61
-   No longer require sudo by [@&#8203;Hoverbear](https://github.com/Hoverbear) in [DeterminateSystems/nix-installer-action#64
-   Handle docker not existing. by [@&#8203;Hoverbear](https://github.com/Hoverbear) in [DeterminateSystems/nix-installer-action#66
-   Don't use docker shim if only using a mounted docker.sock instead of docker-in-docker by [@&#8203;Hoverbear](https://github.com/Hoverbear) in [DeterminateSystems/nix-installer-action#67
-   DETERMINATE_NIX_KVM fixup, support Magic Nix Cache + FlakeHub Cache on Namespace runners by [@&#8203;grahamc](https://github.com/grahamc) in [DeterminateSystems/nix-installer-action#72

**Full Changelog**: DeterminateSystems/nix-installer-action@v9...v10

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/packethost/packet-networking).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzguMSIsInVwZGF0ZWRJblZlciI6IjM3LjI0NS4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->
dc-tec pushed a commit to dc-tec/nixvim that referenced this pull request Aug 7, 2024
… v13 (#18)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[DeterminateSystems/nix-installer-action](https://github.com/DeterminateSystems/nix-installer-action)
| action | major | `v1` -> `v13` |

---

### Release Notes

<details>
<summary>DeterminateSystems/nix-installer-action
(DeterminateSystems/nix-installer-action)</summary>

###
[`v13`](https://github.com/DeterminateSystems/nix-installer-action/releases/tag/v13)

[Compare
Source](https://github.com/DeterminateSystems/nix-installer-action/compare/v12...v13)

##### What's Changed

This update primarily improves the docker shim mechanism.

- science: probes to debug fly on GHA by
[@&#8203;grahamc](https://github.com/grahamc) in
[DeterminateSystems/nix-installer-action#99
- bump by [@&#8203;grahamc](https://github.com/grahamc) in
[DeterminateSystems/nix-installer-action#100
- Update detsys-ts by
[@&#8203;lucperkins](https://github.com/lucperkins) in
[DeterminateSystems/nix-installer-action#102
- Update detsys-ts: Merge pull request
[#&#8203;51](https://github.com/DeterminateSystems/nix-installer-action/issues/51)
from DeterminateSystems/add-missing-actions-to-update-matrix

Add missing Actions to update matrix by
[@&#8203;detsys-pr-bot](https://github.com/detsys-pr-bot) in
[DeterminateSystems/nix-installer-action#103

- Update `detsys-ts`: Merge pull request
[#&#8203;103](https://github.com/DeterminateSystems/nix-installer-action/issues/103)
from
detsys-pr-bot/detsys-ts-update-515d00bc192ae4460e2122572ebc24020c58ea95
by [@&#8203;detsys-pr-bot](https://github.com/detsys-pr-bot) in
[DeterminateSystems/nix-installer-action#105
- Update `detsys-ts`: by
[@&#8203;detsys-pr-bot](https://github.com/detsys-pr-bot) in
[DeterminateSystems/nix-installer-action#104
- README: correct the source-url parameter docs by
[@&#8203;grahamc](https://github.com/grahamc) in
[DeterminateSystems/nix-installer-action#108
- Share /lib64 into the container by
[@&#8203;grahamc](https://github.com/grahamc) in
[DeterminateSystems/nix-installer-action#109

##### New Contributors

- [@&#8203;detsys-pr-bot](https://github.com/detsys-pr-bot) made their
first contribution in
[DeterminateSystems/nix-installer-action#103

**Full Changelog**:
DeterminateSystems/nix-installer-action@v12...v13

###
[`v12`](https://github.com/DeterminateSystems/nix-installer-action/releases/tag/v12)

[Compare
Source](https://github.com/DeterminateSystems/nix-installer-action/compare/v11...v12)

#### What's Changed

- Fix ESM build by [@&#8203;lucperkins](https://github.com/lucperkins)
in
[DeterminateSystems/nix-installer-action#83
- Revert "Fix ESM build" by
[@&#8203;grahamc](https://github.com/grahamc) in
[DeterminateSystems/nix-installer-action#86
- Add CI run for aarch64-darwin by
[@&#8203;lucperkins](https://github.com/lucperkins) in
[DeterminateSystems/nix-installer-action#87
- Update action.yml description for source-url by
[@&#8203;lucperkins](https://github.com/lucperkins) in
[DeterminateSystems/nix-installer-action#89
- Provide new test matrix for source-\* inputs by
[@&#8203;lucperkins](https://github.com/lucperkins) in
[DeterminateSystems/nix-installer-action#91
- Disable docker under act by
[@&#8203;grahamc](https://github.com/grahamc) in
[DeterminateSystems/nix-installer-action#90
- Update detsys-ts by
[@&#8203;lucperkins](https://github.com/lucperkins) in
[DeterminateSystems/nix-installer-action#93
- tests: make megajob block on failure by
[@&#8203;cole-h](https://github.com/cole-h) in
[DeterminateSystems/nix-installer-action#96
- Srv update by [@&#8203;grahamc](https://github.com/grahamc) in
[DeterminateSystems/nix-installer-action#97
- Update detsys-ts (status page changes) by
[@&#8203;lucperkins](https://github.com/lucperkins) in
[DeterminateSystems/nix-installer-action#98

**Full Changelog**:
DeterminateSystems/nix-installer-action@v11...v12

###
[`v11`](https://github.com/DeterminateSystems/nix-installer-action/releases/tag/v11)

[Compare
Source](https://github.com/DeterminateSystems/nix-installer-action/compare/v10...v11)

#### What's Changed

- Rebase on top of detsys-ts for abstracting over
install.determinate.systems by
[@&#8203;grahamc](https://github.com/grahamc) in
[DeterminateSystems/nix-installer-action#74
- Update detsys-ts by [@&#8203;grahamc](https://github.com/grahamc) in
[DeterminateSystems/nix-installer-action#75
- Gracefully handle FlakeHub login failure by
[@&#8203;cole-h](https://github.com/cole-h) in
[DeterminateSystems/nix-installer-action#77
- General JS cleanup by
[@&#8203;lucperkins](https://github.com/lucperkins) in
[DeterminateSystems/nix-installer-action#76
- Fix broken CI caused by Nix reinstallation wiping out the Magic Nix
Cache by [@&#8203;lucperkins](https://github.com/lucperkins) in
[DeterminateSystems/nix-installer-action#79
- Standardize on v4 of the checkout action by
[@&#8203;lucperkins](https://github.com/lucperkins) in
[DeterminateSystems/nix-installer-action#80
- Switch to tsup for building by
[@&#8203;lucperkins](https://github.com/lucperkins) in
[DeterminateSystems/nix-installer-action#82
- Update dependencies by [@&#8203;grahamc](https://github.com/grahamc)
in
[DeterminateSystems/nix-installer-action#85

**Full Changelog**:
DeterminateSystems/nix-installer-action@v10...v11

###
[`v10`](https://github.com/DeterminateSystems/nix-installer-action/releases/tag/v10)

[Compare
Source](https://github.com/DeterminateSystems/nix-installer-action/compare/v9...v10)

#### What's Changed

- action: post-run-job: try clean daemon container, warn on failure by
[@&#8203;colemickens](https://github.com/colemickens) in
[DeterminateSystems/nix-installer-action#61
- No longer require sudo by
[@&#8203;Hoverbear](https://github.com/Hoverbear) in
[DeterminateSystems/nix-installer-action#64
- Handle docker not existing. by
[@&#8203;Hoverbear](https://github.com/Hoverbear) in
[DeterminateSystems/nix-installer-action#66
- Don't use docker shim if only using a mounted docker.sock instead of
docker-in-docker by [@&#8203;Hoverbear](https://github.com/Hoverbear)
in
[DeterminateSystems/nix-installer-action#67
- DETERMINATE_NIX_KVM fixup, support Magic Nix Cache + FlakeHub Cache on
Namespace runners by [@&#8203;grahamc](https://github.com/grahamc) in
[DeterminateSystems/nix-installer-action#72

**Full Changelog**:
DeterminateSystems/nix-installer-action@v9...v10

###
[`v9`](https://github.com/DeterminateSystems/nix-installer-action/releases/tag/v9)

[Compare
Source](https://github.com/DeterminateSystems/nix-installer-action/compare/v8...v9)

#### What's Changed

- Support GitHub Enterprise Server in the access-token config. by
[@&#8203;grahamc](https://github.com/grahamc) in
[DeterminateSystems/nix-installer-action#58
- Support GitHub Enterprise Server using ARC by
[@&#8203;grahamc](https://github.com/grahamc) in
[DeterminateSystems/nix-installer-action#59

**Full Changelog**:
DeterminateSystems/nix-installer-action@v8...v9

###
[`v8`](https://github.com/DeterminateSystems/nix-installer-action/releases/tag/v8)

[Compare
Source](https://github.com/DeterminateSystems/nix-installer-action/compare/v7...v8)

Enables KVM out of the box, for snappy NixOS VM tests.

#### What's Changed

- KVM support out of the box, plus a refreshed README by
[@&#8203;grahamc](https://github.com/grahamc) in
[DeterminateSystems/nix-installer-action#56

**Full Changelog**:
DeterminateSystems/nix-installer-action@v7...v8

###
[`v7`](https://github.com/DeterminateSystems/nix-installer-action/releases/tag/v7)

[Compare
Source](https://github.com/DeterminateSystems/nix-installer-action/compare/v6...v7)

This release should reduce or eliminate `ETXTBSY` related errors by
relying on the official Github Actions [tool
cache](https://github.com/actions/toolkit/tree/master/packages/tool-cache).
This tool cache includes retry support if a download request fails.

On [Namespace
Runners](https://cloud.namespace.so/docs/features/faster-github-actions)
the action should correctly detect that `--init none` must be passed to
the installer.

#### What's Changed

- .github: allow trigger ci manually by
[@&#8203;colemickens](https://github.com/colemickens) in
[DeterminateSystems/nix-installer-action#45
- main.ts: fixup logic to ensure only one installer url override is set
by [@&#8203;colemickens](https://github.com/colemickens) in
[DeterminateSystems/nix-installer-action#44
- Retry (w/ back-off) downloading the installer binary by
[@&#8203;colemickens](https://github.com/colemickens) in
[DeterminateSystems/nix-installer-action#46
- Add check for dist folder by
[@&#8203;Hoverbear](https://github.com/Hoverbear) in
[DeterminateSystems/nix-installer-action#48
- fix: end the FileStreamWriter for the installer file by
[@&#8203;colemickens](https://github.com/colemickens) in
[DeterminateSystems/nix-installer-action#47
- eslint/tsconfig: validate no floating Promises, adjust tsconfig by
[@&#8203;colemickens](https://github.com/colemickens) in
[DeterminateSystems/nix-installer-action#49
- Detect whether we're running in a Namespace runner, and if so, set
`init: none` by [@&#8203;hugosantos](https://github.com/hugosantos) in
[DeterminateSystems/nix-installer-action#52
- Use Github Actions provided tool cache and exec by
[@&#8203;Hoverbear](https://github.com/Hoverbear) in
[DeterminateSystems/nix-installer-action#53

#### New Contributors

- [@&#8203;colemickens](https://github.com/colemickens) made their
first contribution in
[DeterminateSystems/nix-installer-action#45
- [@&#8203;hugosantos](https://github.com/hugosantos) made their first
contribution in
[DeterminateSystems/nix-installer-action#52

**Full Changelog**:
DeterminateSystems/nix-installer-action@v6...v7

###
[`v6`](https://github.com/DeterminateSystems/nix-installer-action/releases/tag/v6)

[Compare
Source](https://github.com/DeterminateSystems/nix-installer-action/compare/v5...v6)

Update to node20

#### What's Changed

- Update the action to use node20 by
[@&#8203;grahamc](https://github.com/grahamc) in
[DeterminateSystems/nix-installer-action#41

**Full Changelog**:
DeterminateSystems/nix-installer-action@v5...v6

###
[`v5`](https://github.com/DeterminateSystems/nix-installer-action/releases/tag/v5)

[Compare
Source](https://github.com/DeterminateSystems/nix-installer-action/compare/v4...v5)

Support for Act, and beta support for private Flakes on FlakeHub

#### What's Changed

- Update README.md to say v4 by
[@&#8203;grahamc](https://github.com/grahamc) in
[DeterminateSystems/nix-installer-action#27
- Add act support by [@&#8203;Hoverbear](https://github.com/Hoverbear)
in
[DeterminateSystems/nix-installer-action#30
- \--nix-build-user-base and --nix-build-user-prefix logic no longer
confused by [@&#8203;Hoverbear](https://github.com/Hoverbear) in
[DeterminateSystems/nix-installer-action#32
- Fix specifying a custom planner by
[@&#8203;Hoverbear](https://github.com/Hoverbear) in
[DeterminateSystems/nix-installer-action#35
- Typescript rewrite by
[@&#8203;Hoverbear](https://github.com/Hoverbear) in
[DeterminateSystems/nix-installer-action#34
- Post run diagnostics by
[@&#8203;grahamc](https://github.com/grahamc) in
[DeterminateSystems/nix-installer-action#39
- Support private flakes on FlakeHub by
[@&#8203;grahamc](https://github.com/grahamc) in
[DeterminateSystems/nix-installer-action#38

**Full Changelog**:
DeterminateSystems/nix-installer-action@v4...v5

###
[`v4`](https://github.com/DeterminateSystems/nix-installer-action/releases/tag/v4)

[Compare
Source](https://github.com/DeterminateSystems/nix-installer-action/compare/v3...v4)

#### What's Changed

- Update example in README to use v3 by
[@&#8203;ajaxbits](https://github.com/ajaxbits) in
[DeterminateSystems/nix-installer-action#25
- Add a ?ci=github to GHA requests, to help us test GHA-specific fixes
more quickly and perform more controlled roll-outs of new releases.
[DeterminateSystems/nix-installer-action#26

#### New Contributors

- [@&#8203;ajaxbits](https://github.com/ajaxbits) made their first
contribution in
[DeterminateSystems/nix-installer-action#25

**Full Changelog**:
DeterminateSystems/nix-installer-action@v3...v4

###
[`v3`](https://github.com/DeterminateSystems/nix-installer-action/releases/tag/v3)

[Compare
Source](https://github.com/DeterminateSystems/nix-installer-action/compare/v2...v3)

A minor release to address
[DeterminateSystems/nix-installer-action#21.

#### What's Changed

- v0.9.0 - nix profile location change by
[@&#8203;Hoverbear](https://github.com/Hoverbear) in
[DeterminateSystems/nix-installer-action#22
- In GHA use Hello instead of fortune by
[@&#8203;Hoverbear](https://github.com/Hoverbear) in
[DeterminateSystems/nix-installer-action#23

**Full Changelog**:
DeterminateSystems/nix-installer-action@v2...v3

###
[`v2`](https://github.com/DeterminateSystems/nix-installer-action/releases/tag/v2)

[Compare
Source](https://github.com/DeterminateSystems/nix-installer-action/compare/v1...v2)

#### What's Changed

- Add missing setting to README table by
[@&#8203;lucperkins](https://github.com/lucperkins) in
[DeterminateSystems/nix-installer-action#14
- README: use tagged release by
[@&#8203;cole-h](https://github.com/cole-h) in
[DeterminateSystems/nix-installer-action#17
- add option to change diagnostic endpoint by
[@&#8203;Mic92](https://github.com/Mic92) in
[DeterminateSystems/nix-installer-action#16
- Reflect removal of channels in upcoming version by
[@&#8203;cole-h](https://github.com/cole-h) in
[DeterminateSystems/nix-installer-action#18
- Reflect v0.6.0 changes by
[@&#8203;Hoverbear](https://github.com/Hoverbear) in
[DeterminateSystems/nix-installer-action#19

#### New Contributors

- [@&#8203;Mic92](https://github.com/Mic92) made their first
contribution in
[DeterminateSystems/nix-installer-action#16

**Full Changelog**:
DeterminateSystems/nix-installer-action@v1...v2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job log](https://developer.mend.io/github/dc-tec/nixvim).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZSJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After running in act, host's nix-daemon is unusable
3 participants