1
0
mirror of https://github.com/rancher/os.git synced 2025-07-17 08:31:02 +00:00

Load modules after running PrepareFs

This commit is contained in:
Josh Curl 2016-12-01 11:27:33 -08:00
parent d53452a7eb
commit 40100ffa7c
No known key found for this signature in database
GPG Key ID: 82B504B9BCCFA677
3 changed files with 19 additions and 1 deletions

View File

@ -359,10 +359,10 @@ func RunInit() error {
return config.LoadConfig(), nil
},
loadModules,
func(c *config.CloudConfig) (*config.CloudConfig, error) {
return c, dfs.PrepareFs(&mountConfig)
},
loadModules,
func(c *config.CloudConfig) (*config.CloudConfig, error) {
network.SetProxyEnvironmentVariables(c)
return c, nil

View File

@ -0,0 +1,5 @@
#cloud-config
rancher:
modules: [btrfs]
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC85w9stZyiLQp/DkVO6fqwiShYcj1ClKdtCqgHtf+PLpJkFReSFu8y21y+ev09gsSMRRrjF7yt0pUHV6zncQhVeqsZtgc5WbELY2DOYUGmRn/CCvPbXovoBrQjSorqlBmpuPwsStYLr92Xn+VVsMNSUIegHY22DphGbDKG85vrKB8HxUxGIDxFBds/uE8FhSy+xsoyT/jUZDK6pgq2HnGl6D81ViIlKecpOpWlW3B+fea99ADNyZNVvDzbHE5pcI3VRw8u59WmpWOUgT6qacNVACl8GqpBvQk8sw7O/X9DSZHCKafeD9G5k+GYbAUz92fKWrx/lOXfUXPS3+c8dRIF

13
tests/modules_test.go Normal file
View File

@ -0,0 +1,13 @@
package integration
import . "gopkg.in/check.v1"
func (s *QemuSuite) TestKernelParameterModule(c *C) {
s.RunQemu(c, "--append", "rancher.modules=[btrfs]")
s.CheckCall(c, "lsmod | grep btrfs")
}
func (s *QemuSuite) TestCloudConfigModule(c *C) {
s.RunQemu(c, "--cloud-config", "./tests/assets/test_27/cloud-config.yml")
s.CheckCall(c, "lsmod | grep btrfs")
}