Comment 3 for bug 1931535

Revision history for this message
zhao.shuai (zhao.shuai.neusoft) wrote :

We made a temporary modification to the local file:
stx-openstack-1.0-78-centos-stable-latest\charts\libvirt-0.1.0\libvirt\templates\daemonset-libvirt.yaml.
The modification method is as follows:
          lifecycle:
            postStart:
              exec:
                command:
                  - bash
                  - -c
                  - |-
                    rm -f /etc/localtime
                    ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
After modification, re-upload stx-openstack-1.0-78-centos-stable-latest.tgz in STX system and apply.
The time displayed in the windows VM is consistent with the host time zone, and the correct time display is still maintained after restarting.

The reasonable method we currently analyze is:
...
      containers:
        - name: libvirt
          lifecycle:
            postStart:
              exec:
                command:
                  - bash
                  - -c
                  - |-
                    rm -f /etc/localtime
          volumeMounts:
            - mountPath: /etc/localtime
              name: localtime
              readOnly: true
...
      volumes:
        - name: localtime
          hostPath:
            path: /etc/localtime
we don'n know if the community can provide a more efficient modification method.
Thank you so much.