Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: zwwhdls <[email protected]>
  • Loading branch information
zwwhdls committed Sep 12, 2024
1 parent 8683cce commit 43cf9cd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions dashboard-ui-v2/src/components/pod-basic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import React, { useState } from 'react'
import { ProCard, ProDescriptions } from '@ant-design/pro-components'
import { Button, message, Popconfirm, type PopconfirmProps, Tooltip } from 'antd'
import { Button, message, Popconfirm, type PopconfirmProps, Space, Tooltip } from 'antd'
import { Badge } from 'antd/lib'
import { FormattedMessage } from 'react-intl'
import YAML from 'yaml'
Expand Down Expand Up @@ -58,7 +58,7 @@ const PodBasic: React.FC<{
<ProCard
title={<FormattedMessage id="basic" />}
extra={
<>
<Space>
{supportPodSmoothUpgrade(image || '') && supportPodSmoothUpgrade(data || '') ? (
<Popconfirm
title="Smoothly Upgrade"
Expand Down Expand Up @@ -89,7 +89,7 @@ const PodBasic: React.FC<{
content={YAML.stringify(omitPod(pod))}
/>
</Tooltip>
</>
</Space>
}
>
<ProDescriptions
Expand Down
4 changes: 2 additions & 2 deletions pkg/fuse/grace.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func uploadBinary(ctx context.Context, client *k8s.K8sClient, pod *corev1.Pod) e
pod.Name,
pod.Namespace,
config.MountContainerName,
[]string{"sh", "-c", "rm -rf /usr/local/bin/juicefs && cp /tmp/juicefs /usr/local/bin/juicefs"},
[]string{"sh", "-c", "rm -rf /usr/local/bin/juicefs && mv /tmp/juicefs /usr/local/bin/juicefs"},
)
if err != nil {
fdLog.Error(err, "upload binary error", "pod", pod.Name, "stdout", stdout, "stderr", stderr)
Expand All @@ -253,7 +253,7 @@ func uploadBinary(ctx context.Context, client *k8s.K8sClient, pod *corev1.Pod) e
pod.Name,
pod.Namespace,
config.MountContainerName,
[]string{"sh", "-c", "rm -rf /usr/bin/juicefs && cp /tmp/juicefs /usr/bin/juicefs && rm -rf /usr/local/juicefs/mount/jfsmount && cp /tmp/jfsmount /usr/local/juicefs/mount/jfsmount"},
[]string{"sh", "-c", "rm -rf /usr/bin/juicefs && mv /tmp/juicefs /usr/bin/juicefs && rm -rf /usr/local/juicefs/mount/jfsmount && mv /tmp/jfsmount /usr/local/juicefs/mount/jfsmount"},
)
if err != nil {
fdLog.Error(err, "upload binary error", "pod", pod.Name, "stdout", stdout, "stderr", stderr)
Expand Down
4 changes: 2 additions & 2 deletions pkg/juicefs/mount/pod_mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,8 @@ func (p *PodMount) waitUtilMountReady(ctx context.Context, jfsSetting *jfsConfig
}
if util.SupportFusePass(jfsSetting.Attr.Image) {
logger.Error(err, "pod is not ready within 60s")
// mount pod hang probably, close fd and delete it
logger.Info("close fd and delete pod")
// mount pod hang probably, close fd
logger.Info("close fuse fd")
fuse.GlobalFds.CloseFd(jfsSetting.HashVal)
// umount it
_ = util.DoWithTimeout(ctx, defaultCheckTimeout, func() error {
Expand Down

0 comments on commit 43cf9cd

Please sign in to comment.