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

fix xfs mount issues #212

Merged
merged 3 commits into from
May 13, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading