-
Notifications
You must be signed in to change notification settings - Fork 507
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
Create an /etc/fstab entry when storage is attached #9599
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, some superficial tweaks.
return errors.Trace(err) | ||
} | ||
|
||
if _, err = f.WriteString("\n" + entry + "\n"); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a comment to indicate that the file will be at the end now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
storage/provider/managedfs_test.go
Outdated
err := ioutil.WriteFile(filepath.Join(s.fakeEtcDir, "fstab"), []byte(nonRelatedFstabEntry), 0644) | ||
c.Assert(err, jc.ErrorIsNil) | ||
|
||
mtabEntry := fmt.Sprintf("%s %s other mtab stuff", "/dev/sda1", testMountPoint) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be a bit clearer with /dev/sda1
in the format string rather than subbed in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
37b55e1
to
300d394
Compare
|
2 similar comments
|
|
juju#9599 ## Description of change When a block device is attached for storage, create an /etc/fstab entry. Delete the /etc/fstab entry when storage is detached. ## QA steps bootstrap aws deploy postgresql with storage ssh into the postgresql machine and check that there's an fstab entry matching the mtab entry detach the storage ensure that the fstab entry is removed ## Bug reference https://bugs.launchpad.net/juju/+bug/1783419
#9621 ## Description of change Backport some storage fixes from develop: #9599 When a block device is attached for storage, create an /etc/fstab entry. Delete the /etc/fstab entry when storage is detached. #9607 Deploying a charm with storage to maas fails if a placement directive is used, eg --to zone=<blah>. The PR fixes the underlying deployment logic to support that case. Also forward port AWS storage fix from 2.4: #9620 AWS can provision xen pv volumes such that udev info is missing any hardware identifying characteristics. In this case, we need to force a fallback to match on device name, which is not perfect but it's all we can do. ## QA steps bootstrap aws and maas and test postgresql deployments with storage ## Bug reference https://bugs.launchpad.net/juju/+bug/1783419 https://bugs.launchpad.net/juju/+bug/1765959 https://bugs.launchpad.net/juju/+bug/1809478
#9629 ## Description of change Merge 2.5 into develop picking up these PRs: #9626 fix list offers on k8s models #9625 improved txn pruning #9622 incorrect arch for ec2 a1 instances #9620 handle storage with aws xen pv volumes #9599 write storage mounts to /etc/fstab #9607 maas storage with zone placement #9619 fix raft worker timeouts #9612 Bug 1808947 fix #9585 unplace missing charm profile upgrade data ## QA steps bootstrap smoke test
Description of change
When a block device is attached for storage, create an /etc/fstab entry.
Delete the /etc/fstab entry when storage is detached.
QA steps
bootstrap aws
deploy postgresql with storage
ssh into the postgresql machine and check that there's an fstab entry matching the mtab entry
detach the storage
ensure that the fstab entry is removed
Bug reference
https://bugs.launchpad.net/juju/+bug/1783419