-
Notifications
You must be signed in to change notification settings - Fork 22
Fix/ub 624 flex should not write log into flex driver director #166
Fix/ub 624 flex should not write log into flex driver director #166
Conversation
Signed-off-by: feihuang <feihuang@feihuangs-mbp.cn.ibm.com>
Signed-off-by: feihuang <feihuang@feihuangs-mbp.cn.ibm.com>
Signed-off-by: feihuang <feihuang@feihuangs-mbp.cn.ibm.com>
Signed-off-by: feihuang <feihuang@feihuangs-mbp.cn.ibm.com>
Review status: 0 of 10 files reviewed at latest revision, 1 unresolved discussion, some commit checks broke. Dockerfile.Flex, line 11 at r1 (raw file):
Fei, don't forget to remove also the logrotate apk add, since we don't need it any more. Comments from Reviewable |
remove also the logrotate apk add |
Review status: 0 of 9 files reviewed at latest revision, 12 unresolved discussions, some commit checks broke. deploy/k8s_deployments/setup_flex.sh, line 9 at r2 (raw file):
bring this line back, because we still do infinit loop, but now only for tailing the log deploy/k8s_deployments/setup_flex.sh, line 159 at r2 (raw file):
please don't hardcoded the flex log file, just use ${DRIVER} deploy/k8s_deployments/setup_flex.sh, line 161 at r2 (raw file):
same here,, just use ${DRIVER} instead of ubiqutiy-k8s-flex.log scripts/installer-for-ibm-storage-enabler-for-containers/ubiquity-configmap.yml, line 32 at r2 (raw file):
"daemonset" -> "Flex daemonset" scripts/installer-for-ibm-storage-enabler-for-containers/ubiquity-configmap.yml, line 33 at r2 (raw file):
keep the convention, the key name should be with - and not with _. please fix it FLEX-LOG-DIR scripts/installer-for-ibm-storage-enabler-for-containers/ubiquity-configmap.yml, line 35 at r2 (raw file):
missing space after "#" sign scripts/installer-for-ibm-storage-enabler-for-containers/ubiquity-configmap.yml, line 36 at r2 (raw file):
FLEX-LOG-ROTATE-MAXSIZE also please make sure you update Dima about these new variables so he will update the UG according. scripts/installer-for-ibm-storage-enabler-for-containers/ubiquity_installer.conf, line 48 at r2 (raw file):
Flex log directory. if you change the default, then make the new path exist on all the nodes and update the Flex daemonset hostpath according.Note: validate string with Dima scripts/installer-for-ibm-storage-enabler-for-containers/yamls/ubiquity-k8s-flex-daemonset.yml, line 39 at r2 (raw file):
don't forget to change the key to FLEX-LOG-DIR also below scripts/installer-for-ibm-storage-enabler-for-containers/yamls/ubiquity-k8s-flex-daemonset.yml, line 104 at r2 (raw file):
append to the note : if not the flex log will not be persistent and the flex pod will not be able to tail the log. utils/utils.go, line 14 at r2 (raw file):
BUG Comments from Reviewable |
Review status: 0 of 9 files reviewed at latest revision, 12 unresolved discussions, some commit checks failed. deploy/k8s_deployments/setup_flex.sh, line 9 at r2 (raw file): Previously, shay-berman wrote…
bring back deploy/k8s_deployments/setup_flex.sh, line 159 at r2 (raw file): Previously, shay-berman wrote…
Done deploy/k8s_deployments/setup_flex.sh, line 161 at r2 (raw file): Previously, shay-berman wrote…
Done scripts/installer-for-ibm-storage-enabler-for-containers/ubiquity-configmap.yml, line 32 at r2 (raw file): Previously, shay-berman wrote…
Done scripts/installer-for-ibm-storage-enabler-for-containers/ubiquity-configmap.yml, line 33 at r2 (raw file): Previously, shay-berman wrote…
Done scripts/installer-for-ibm-storage-enabler-for-containers/ubiquity-configmap.yml, line 35 at r2 (raw file): Previously, shay-berman wrote…
Done scripts/installer-for-ibm-storage-enabler-for-containers/ubiquity-configmap.yml, line 36 at r2 (raw file): Previously, shay-berman wrote…
Done, will info Dima Comments from Reviewable |
Review status: 0 of 9 files reviewed at latest revision, 12 unresolved discussions, some commit checks broke. scripts/installer-for-ibm-storage-enabler-for-containers/ubiquity_installer.conf, line 48 at r2 (raw file): Previously, shay-berman wrote…
Done Comments from Reviewable |
…ite_log_into_flex_driver_directory will change back after test Signed-off-by: feihuang <feihuang@feihuangs-mbp.cn.ibm.com>
Signed-off-by: feihuang <feihuang@feihuangs-mbp.cn.ibm.com>
@hfeish please do NOT merge to dev yet. We may postponed this fix to the next Ubiquity release. |
I reviewed it now, please apply the comments and then you can merge it. Review status: 0 of 10 files reviewed at latest revision, 4 unresolved discussions, some commit checks failed. Dockerfile.Flex, line 11 at r1 (raw file): Previously, shay-berman wrote…
ok i see you removed it glide.yaml, line 12 at r3 (raw file):
please don't merge this version to dev. deploy/k8s_deployments/setup_flex.sh, line 82 at r3 (raw file):
is this needed? does the flex it self create the dir if not exist? scripts/installer-for-ibm-storage-enabler-for-containers/yamls/ubiquity-k8s-flex-daemonset.yml, line 39 at r2 (raw file): Previously, shay-berman wrote…
thanks for fixing utils/utils.go, line 14 at r2 (raw file): Previously, shay-berman wrote…
ok Comments from Reviewable |
Review status: 0 of 10 files reviewed at latest revision, 6 unresolved discussions, some commit checks failed. glide.yaml, line 12 at r3 (raw file): Previously, shay-berman wrote…
Sure, I will change it to dev while merging to dev deploy/k8s_deployments/setup_flex.sh, line 82 at r3 (raw file): Previously, shay-berman wrote…
You're right, we don't need this utils/utils.go, line 14 at r2 (raw file): Previously, shay-berman wrote…
Any suggestion here? you mean we need to add UT for "func LoadConfig"? Comments from Reviewable |
Review status: 0 of 10 files reviewed at latest revision, 4 unresolved discussions, some commit checks failed. utils/utils.go, line 14 at r2 (raw file): Previously, hfeish (Fei Huang) wrote…
you don't need to mock something here Comments from Reviewable |
Signed-off-by: feihuang <feihuang@feihuangs-mbp.cn.ibm.com>
Review status: 0 of 11 files reviewed at latest revision, 4 unresolved discussions, some commit checks failed. utils/utils.go, line 14 at r2 (raw file): Previously, shay-berman wrote…
Add utils_test.go for this UT Comments from Reviewable |
Review status: 0 of 11 files reviewed at latest revision, 4 unresolved discussions, some commit checks failed. utils/utils_test.go, line 4 at r4 (raw file):
why you are not doing it with Ginkgo? like we do for all the UTs? any reason why you choose to do it different? its a bit hard to understand what you want to test in tests1 and tests1 utils/utils_test.go, line 92 at r4 (raw file):
why you just print error? don't you need to fail here? Comments from Reviewable |
Review status: 0 of 11 files reviewed at latest revision, 6 unresolved discussions, some commit checks failed. utils/utils_test.go, line 4 at r4 (raw file): Previously, shay-berman wrote…
I use it because we need a lot data to set in the env to test, so I use the data table drive test. utils/utils_test.go, line 92 at r4 (raw file): Previously, shay-berman wrote…
Add t.Fail() here Comments from Reviewable |
Review status: 0 of 11 files reviewed at latest revision, 5 unresolved discussions, some commit checks failed. utils/utils_test.go, line 4 at r4 (raw file): Previously, hfeish (Fei Huang) wrote…
but u can still use data set in ginkgo test framework and the make it more standard lile all other test structure and then u can use assert insted of doing if else stuff. so just wonder if there is real reason u used testing instead of ginkgo? Comments from Reviewable |
Signed-off-by: feihuang <feihuang@feihuangs-mbp.cn.ibm.com>
Review status: 0 of 12 files reviewed at latest revision, 5 unresolved discussions, some commit checks failed. utils/utils_test.go, line 4 at r4 (raw file): Previously, shay-berman wrote…
Yes, you are right, change it to ginkgo, please review Comments from Reviewable |
Review my last comments Review status: 0 of 12 files reviewed at latest revision, 4 unresolved discussions, some commit checks failed. glide.yaml, line 13 at r5 (raw file):
make sure to set it to dev branch before merge to dev. utils/utils_test.go, line 4 at r4 (raw file): Previously, hfeish (Fei Huang) wrote…
much better, thanks! small improvement (its not a must) - but I would move the tests1 var into the first It and tests2 into second It. Comments from Reviewable |
…x_driver_director
How to test:
1. check the default log path: /var/log(exist in all flex pods, and nodes), logs will rotate if > 50 MB, will keep 5 compressed log file
2. can change log path to example /var/log/ubiquity in ubiquity_install.conf and configmap, need to make sure this path existed(in all nodes, also for controller-manager-pod) before install
3. can change log rotate size from 50MB to others in ubiquity-configmap
4. flex binary will create the log dir (ex: /var/log/ubiquity) if it not exist
5. flex logs not sit on k8s plugin directory
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)