Skip to content

Commit

Permalink
Set conatiner image to fix XFS mounting issues (#212)
Browse files Browse the repository at this point in the history
* fix xfs mount issues

* fix workflows

* add options back

---------

Co-authored-by: happytreees <[email protected]>
  • Loading branch information
happytreees and happytreees committed May 13, 2024
1 parent 6c4c38f commit 1183bcd
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 360 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/notify-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ jobs:
runs-on: ubuntu-latest
name: Pull Request Notification
steps:
- run: |
echo "{\"text\":\"Vultr-CSI : PR https://github.com/${{ github.repository }}/pull/${{ github.event.number }} \"}" > mattermost.json
- uses: mattermost/[email protected]
- uses: mattermost/action-mattermost-notify@master
with:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
MATTERMOST_USERNAME: ${{ secrets.MATTERMOST_USERNAME}}
MATTERMOST_ICON: ${{ secrets.MATTERMOST_ICON }}
MATTERMOST_USERNAME: ${{ secrets.MATTERMOST_USERNAME }}
MATTERMOST_ICON_URL: ${{ secrets.MATTERMOST_ICON_URL }}
TEXT: "${{ github.repository }} : PR https://github.com/${{ github.repository }}/pull/${{ github.event.number }}"
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM alpine:latest
FROM alpine:3.18

RUN apk update
RUN apk add --no-cache ca-certificates e2fsprogs findmnt bind-tools e2fsprogs-extra xfsprogs blkid
RUN apk add --no-cache ca-certificates e2fsprogs findmnt bind-tools e2fsprogs-extra xfsprogs xfsprogs-extra blkid

ADD csi-vultr-plugin /
ENTRYPOINT ["/csi-vultr-plugin"]
3 changes: 1 addition & 2 deletions driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ type VultrDriver struct {
isController bool
waitTimeout time.Duration

log *logrus.Entry
vMounter Mounter
log *logrus.Entry

mounter *mount.SafeFormatAndMount
resizer *mount.ResizeFs
Expand Down
49 changes: 1 addition & 48 deletions driver/driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ func TestDriverSuite(t *testing.T) {

waitTimeout: defaultTimeout,

log: log,
vMounter: NewFakeMounter(log),
log: log,
}

go d.Run()
Expand All @@ -66,49 +65,3 @@ func TestDriverSuite(t *testing.T) {
t.Errorf("driver run failed: %s", err)
}
}

type fakeMounter struct {
log *logrus.Entry
mounted map[string]string
}

func NewFakeMounter(log *logrus.Entry) *fakeMounter {
return &fakeMounter{log: log}
}

func (f *fakeMounter) Format(source, fs string) error {
return nil
}

func (f *fakeMounter) IsFormatted(source string) (bool, error) {
return true, nil
}

func (f *fakeMounter) Mount(source, target, fs string, opts ...string) error {
return nil
}

func (f *fakeMounter) IsMounted(target string) (bool, error) {
return true, nil
}

func (f *fakeMounter) UnMount(target string) error {
delete(f.mounted, target)
return nil
}

func (f *fakeMounter) GetStatistics(volumePath string) (volumeStatistics, error) {
return volumeStatistics{
availableBytes: 3 * giB,
totalBytes: 10 * giB,
usedBytes: 7 * giB,

availableInodes: 3000,
totalInodes: 10000,
usedInodes: 7000,
}, nil
}

func (f *fakeMounter) IsBlockDevice(volumePath string) (bool, error) {
return false, nil
}
300 changes: 0 additions & 300 deletions driver/mounter.go

This file was deleted.

Loading

0 comments on commit 1183bcd

Please sign in to comment.