Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

大镜像文件无法构建 #2139

Closed
PDMoFan opened this issue Jan 21, 2025 · 4 comments
Closed

大镜像文件无法构建 #2139

PDMoFan opened this issue Jan 21, 2025 · 4 comments
Assignees
Labels
Bug BUG Feedback

Comments

@PDMoFan
Copy link

PDMoFan commented Jan 21, 2025

创建组件的时候选择镜像容器,填写完配置后点击构建,大镜像文件(10G和16G)都无法构建,会卡在推送镜像到默认私有仓库这一步

环境:
快速安装6.1.1版本rainbond

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Title: Large image file cannot be built

When creating a component, select the image container, fill in the configuration and click Build. Large image files (10G and 16G) cannot be built, and you will be stuck in the step of pushing the image to the default private warehouse.

environment:
Quickly install version 6.1.1 rainbond

@zzzhangqi
Copy link
Collaborator

这是由于默认的镜像仓库(registry)对接了 Minio 引发的问题,同时还发现在 registry v2 release 版本中无法对镜像进行 GC 清理,因此在下个版本(v6.1.2-release)会将默认对接的存储切换到本地存储。

临时将默认的镜像仓库从存储到 Minio 切换到本地存储如下:

  1. 更新 rainbond-operator 镜像至 v6.1.2-pre 版本
$ kubectl edit deploy rainbond-operator -n rbd-system

...
spec:
...
  image: registry.cn-hangzhou.aliyuncs.com/goodrain/rainbond-operator:v6.1.2-pre
  1. 获取自动创建的 rbd-hub pv 本地路径
$ kubectl get pv | grep "rbd-system/rbd-hub" | awk '{print $1}' | xargs kubectl get pv -o yaml

apiVersion: v1
kind: PersistentVolume
...
spec:
  ...
  hostPath:
    path: /opt/rainbond/local-path-provisioner/pvc-926fab85-d8c1-4699-aab0-4e45c610997b_rbd-system_rbd-hub
    type: DirectoryOrCreate
  ...
        - key: kubernetes.io/hostname
          operator: In
          values:
          - 172.17.1.23
  ...

Tip

如果旧镜像数据不需要了,下述步骤可以不执行。

  1. 安装 Minio Client 工具 Mc
curl https://dl.minio.org.cn/client/mc/release/linux-amd64/mc --create-dirs -o /bin/mc
chmod +x /bin/mc
  1. 获取 Minio Service IP
kubectl get svc -n rbd-system | grep minio-service
  1. 从 Minio 中拷贝数据到本地存储(在172.17.1.23节点执行)
mc alias set myminio http://10.43.61.29:9000 admin admin1234
mc mirror myminio/rbd-hub /opt/rainbond/local-path-provisioner/pvc-926fab85-d8c1-4699-aab0-4e45c610997b_rbd-system_rbd-hub

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


This is because the default mirror repository is connected to Minio. It is also found that the image cannot be cleaned in the registry v2 release version GC, so in the next version (v6.1.2-release), the default docked storage will be switched to local storage.

Temporarily switch the default mirror repository from storage to Minio to local storage as follows:

  1. Update the rainbond-operator mirror to v6.1.2-pre version
$ kubectl edit deploy rainbond-operator -n rbd-system

...
spec:
...
  image: registry.cn-hangzhou.aliyuncs.com/goodrain/rainbond-operator:v6.1.2-pre
  1. Get the automatically created rbd-hub pv local path
$ kubectl get pv | grep "rbd-system/rbd-hub" | awk '{print $1}' | xargs kubectl get pv -o yaml

apiVersion: v1
kind: PersistentVolume
...
spec:
  ...
  hostPath:
    path: /opt/rainbond/local-path-provisioner/pvc-926fab85-d8c1-4699-aab0-4e45c610997b_rbd-system_rbd-hub
    type: DirectoryOrCreate
  ...
        - key: kubernetes.io/hostname
          operator: In
          values:
          - 172.17.1.23
  ...

Tip

If the old mirror data is no longer needed, the following steps may not be performed.

  1. Install Minio Client Tools Mc
curl https://dl.minio.org.cn/client/mc/release/linux-amd64/mc --create-dirs -o /bin/mc
chmod +x /bin/mc
  1. Obtain the Minio Service IP
kubectl get svc -n rbd-system | grep minio-service
  1. Copy data from Minio to local storage (execute on the 172.17.1.23 node)
mc alias set myminio http://10.43.61.29:9000 admin admin1234
mc mirror myminio/rbd-hub /opt/rainbond/local-path-provisioner/pvc-926fab85-d8c1-4699-aab0-4e45c610997b_rbd-system_rbd-hub

@zzzhangqi zzzhangqi added the Bug BUG Feedback label Feb 7, 2025
@zzzhangqi
Copy link
Collaborator

fix v6.1.2-release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug BUG Feedback
Projects
None yet
Development

No branches or pull requests

4 participants