mirror of
https://github.com/rancher/os.git
synced 2025-07-18 17:11:04 +00:00
Load modules after running PrepareFs
This commit is contained in:
parent
d53452a7eb
commit
40100ffa7c
@ -359,10 +359,10 @@ func RunInit() error {
|
|||||||
|
|
||||||
return config.LoadConfig(), nil
|
return config.LoadConfig(), nil
|
||||||
},
|
},
|
||||||
loadModules,
|
|
||||||
func(c *config.CloudConfig) (*config.CloudConfig, error) {
|
func(c *config.CloudConfig) (*config.CloudConfig, error) {
|
||||||
return c, dfs.PrepareFs(&mountConfig)
|
return c, dfs.PrepareFs(&mountConfig)
|
||||||
},
|
},
|
||||||
|
loadModules,
|
||||||
func(c *config.CloudConfig) (*config.CloudConfig, error) {
|
func(c *config.CloudConfig) (*config.CloudConfig, error) {
|
||||||
network.SetProxyEnvironmentVariables(c)
|
network.SetProxyEnvironmentVariables(c)
|
||||||
return c, nil
|
return c, nil
|
||||||
|
5
tests/assets/test_27/cloud-config.yml
Normal file
5
tests/assets/test_27/cloud-config.yml
Normal 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
13
tests/modules_test.go
Normal 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")
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user