Skip to content

Commit 3375b1c

Browse files
committed
Revert "Merge pull request #413 from runkecheng/save_xenon_metadata"
This reverts commit a6386c7, reversing changes made to f6932c6.
1 parent bf93a6b commit 3375b1c

File tree

12 files changed

+12
-50
lines changed

12 files changed

+12
-50
lines changed

mysqlcluster/container/backup.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ func (c *backupSidecar) getVolumeMounts() []corev1.VolumeMount {
134134
{
135135
Name: utils.DataVolumeName,
136136
MountPath: utils.DataVolumeMountPath,
137-
SubPath: utils.MysqlDataSubPath,
138137
},
139138
{
140139
Name: utils.LogsVolumeName,

mysqlcluster/container/init_mysql.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ func (c *initMysql) getVolumeMounts() []corev1.VolumeMount {
116116
{
117117
Name: utils.DataVolumeName,
118118
MountPath: utils.DataVolumeMountPath,
119-
SubPath: utils.MysqlDataSubPath,
120119
},
121120
{
122121
Name: utils.LogsVolumeName,

mysqlcluster/container/init_mysql_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ var (
5959
{
6060
Name: utils.DataVolumeName,
6161
MountPath: utils.DataVolumeMountPath,
62-
SubPath: utils.MysqlDataSubPath,
6362
},
6463
{
6564
Name: utils.LogsVolumeName,

mysqlcluster/container/init_sidecar.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,6 @@ func (c *initSidecar) getVolumeMounts() []corev1.VolumeMount {
202202
corev1.VolumeMount{
203203
Name: utils.DataVolumeName,
204204
MountPath: utils.DataVolumeMountPath,
205-
SubPath: utils.MysqlDataSubPath,
206-
},
207-
corev1.VolumeMount{
208-
Name: utils.DataVolumeName,
209-
MountPath: utils.XenonDataVolumeMountPath,
210-
SubPath: utils.XenonDataSubPath,
211205
},
212206
)
213207
}

mysqlcluster/container/init_sidecar_test.go

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -455,18 +455,10 @@ func TestGetInitSidecarVolumeMounts(t *testing.T) {
455455
persistenceCase := EnsureContainer("init-sidecar", &testPersistenceCluster)
456456
persistenceVolumeMounts := make([]corev1.VolumeMount, 6, 7)
457457
copy(persistenceVolumeMounts, defaultInitsidecarVolumeMounts)
458-
persistenceVolumeMounts = append(persistenceVolumeMounts,
459-
corev1.VolumeMount{
460-
Name: utils.DataVolumeName,
461-
MountPath: utils.DataVolumeMountPath,
462-
SubPath: utils.MysqlDataSubPath,
463-
},
464-
corev1.VolumeMount{
465-
Name: utils.DataVolumeName,
466-
MountPath: utils.XenonDataVolumeMountPath,
467-
SubPath: utils.XenonDataSubPath,
468-
},
469-
)
458+
persistenceVolumeMounts = append(persistenceVolumeMounts, corev1.VolumeMount{
459+
Name: utils.DataVolumeName,
460+
MountPath: utils.DataVolumeMountPath,
461+
})
470462
assert.Equal(t, persistenceVolumeMounts, persistenceCase.VolumeMounts)
471463
}
472464
}

mysqlcluster/container/mysql.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ func (c *mysql) getVolumeMounts() []corev1.VolumeMount {
141141
{
142142
Name: utils.DataVolumeName,
143143
MountPath: utils.DataVolumeMountPath,
144-
SubPath: utils.MysqlDataSubPath,
145144
},
146145
{
147146
Name: utils.LogsVolumeName,

mysqlcluster/container/mysql_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ func TestGetMysqlVolumeMounts(t *testing.T) {
147147
{
148148
Name: "data",
149149
MountPath: "/var/lib/mysql",
150-
SubPath: "mysql",
151150
},
152151
{
153152
Name: "logs",

mysqlcluster/container/xenon.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,6 @@ func (c *xenon) getVolumeMounts() []corev1.VolumeMount {
114114
Name: utils.ScriptsVolumeName,
115115
MountPath: utils.ScriptsVolumeMountPath,
116116
},
117-
{
118-
Name: utils.DataVolumeName,
119-
MountPath: utils.XenonDataVolumeMountPath,
120-
SubPath: utils.XenonDataSubPath,
121-
},
122117
{
123118
Name: utils.XenonVolumeName,
124119
MountPath: utils.XenonVolumeMountPath,

mysqlcluster/container/xenon_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,6 @@ func TestGetXenonVolumeMounts(t *testing.T) {
134134
Name: "scripts",
135135
MountPath: "/scripts",
136136
},
137-
{
138-
Name: "data",
139-
MountPath: "/var/lib/xenon",
140-
SubPath: "xenon",
141-
},
142137
{
143138
Name: "xenon",
144139
MountPath: "/etc/xenon",

sidecar/init.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,6 @@ func runInitCommand(cfg *Config) error {
134134
if err = os.Chown(dataPath, uid, gid); err != nil {
135135
return fmt.Errorf("failed to chown %s: %s", dataPath, err)
136136
}
137-
// chown -R mysql:mysql /var/lib/xenon.
138-
if err = os.Chown(xenonDataPath, uid, gid); err != nil {
139-
return fmt.Errorf("failed to chown %s: %s", xenonDataPath, err)
140-
}
141137
}
142138

143139
// copy appropriate my.cnf from config-map to config mount.

0 commit comments

Comments
 (0)