更新方法与策略:自动升级方法
更新openshift-ansible的脚本代码
git pull git checkout -b release-3.7
安装需要的包
ansible all -m yum -a 'name=pyOpenSSL state=present'
关闭Service Catalog和Template Service Broker。
3.7 以上版本默认会启用 Service Catalog 和 Template Service Broker
# /etc/ansible/hosts... openshift_enable_service_catalog=falsetemplate_service_broker_install=falseansible_service_broker_install=false...
关闭etcd目录的selinux检查
关闭任务Check selinux label of '{{ etcd_data_dir }}'与Make sure the '{{ etcd_data_dir }}' has the proper label
# roles/etcd/tasks/backup/backup.yml... - name: Detecting Atomic Host Operating System stat: path: /run/ostree-booted register: l_ostree_booted#- name: Check selinux label of '{{ etcd_data_dir }}'# command: ># stat -c '%C' {{ etcd_data_dir }}# register: l_etcd_selinux_labels##- debug:# msg: "{{ l_etcd_selinux_labels }}"##- name: Make sure the '{{ etcd_data_dir }}' has the proper label# command: ># chcon -t svirt_sandbox_file_t "{{ etcd_data_dir }}"# when:# - l_etcd_selinux_labels.rc == 0# - "'svirt_sandbox_file_t' not in l_etcd_selinux_labels.stdout"- name: Generate etcd backup command: > {{ r_etcd_common_etcdctl_command }} backup --data-dir={{ l_etcd_incontainer_data_dir }} --backup-dir={{ l_etcd_incontainer_backup_dir }} ...
执行更新
ansible-playbook -i inventory-hosts playbooks/byo/openshift-cluster/upgrades/v3_7/upgrade.yml
查看当前oc版本及各node版本
oc version oc get node
升级后发现的问题
RBD的storageclass异常
# 解决方法,storageclass.parameters中添加 imageFormat: "1"apiVersion: storage.k8s.io/v1 metadata: name: ceph-rbd-sc Parameters: adminId: admin adminSecretName: ceph-secret adminSecretNamespace: kube-system fsType: ext4 imageFormat: "1" monitors: 192.168.1.3:6789 pool: rbd userId: admin userSecretName: ceph-secret Provisioner: kubernetes.io/rbd
作者:潘晓华Michael
链接:https://www.jianshu.com/p/47e41c4a707f
点击查看更多内容
为 TA 点赞
评论
共同学习,写下你的评论
评论加载中...
作者其他优质文章
正在加载中
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦