Compare commits

...

16 Commits

Author SHA1 Message Date
hysyeah
f93448f8b2 fix: stop app if it is hami cause unschedule no wait (#2531)
* fix: stop app if it is hami cause unschedule

* ingore param from req if size=0
2026-02-12 20:35:10 +08:00
hysyeah
e546aeb3e7 fix: set amd apu/gpu limit key to amd.com/gpu (#2516) 2026-02-10 15:42:22 +08:00
hys
2ae096946b fix: set amd apu/gpu limit key to amd.com/gpu 2026-02-10 14:52:51 +08:00
eball
62e6b1de90 Merge branch 'main' into module-appservice
* main:
  docs: add OpenClaw tutorial (#2506)
  docs: batch add docs for one (#2457)
  settings, market, files, vault, desktop: fix some ui bugs (#2503)
  feat(cli): add more lines to default journalctl limit (#2502)
  app-service: handle case for system apps without configuration in permission API  (#2499)
  fix(cli): seperate dmesg args for dmesg logs (#2497)
  docs: add FAQs about activation and login (#2481)
  docs: add middleware data access and integration guides (#2444)
  docs: add docs for distributing olares apps (#2484)
2026-02-09 15:58:39 +08:00
eball
17b4fdaf7f fix: update app-service image version to 0.5.2 2026-02-09 15:57:04 +08:00
eball
45a326230e fix: handle case for system applications without configuration in provider list (#2507) 2026-02-09 15:14:35 +08:00
eball
914c99e5df Merge branch 'main' into module-appservice
* main:
  Modify release-daemon.yaml for arm64 support
  fix: seafile trim commit_id for syncing and change psql ccnet init (#2495)
  backup: sync systemEnv default remote url (#2492)
  download-server: nats message publish modify (#2489)
  fix(cli): clear master host config when uninstalling (#2488)
  market, settings: support optional data deletion and fix bugs. (#2486)
  fix(cli): do not override upgrade target version by config file (#2483)
  app-service: feat app uninstall delete data (#2480)
2026-02-05 17:23:00 +08:00
eball
8f85a09564 app-service: handle case for system apps without configuration in permission API 2026-02-05 17:21:45 +08:00
eball
65b57fbf66 fix: handle case for system apps without configuration in permission API (#2498) 2026-02-05 17:19:13 +08:00
hysyeah
b91566d6cd fix: app uninstall delete data (#2478) 2026-02-03 20:33:47 +08:00
dkeven
de87bd6b8e feat(appservice): support updating more fields in api & controller (#2472) 2026-02-03 20:32:14 +08:00
hys
95291474cb fix: add spec ports 2026-02-03 20:31:32 +08:00
hys
7a23d52b13 fix: check k8s request before into installing state 2026-02-03 20:31:32 +08:00
hys
93a9fcd834 fix: v2 app stop 2026-02-03 20:31:32 +08:00
hys
45a3e91bbd fix: helm upgrade do not use atomic param and allow upgrade failed release 2026-02-03 20:31:32 +08:00
hys
c9bac68646 fix: failed release upgrade 2026-02-03 20:31:32 +08:00
6 changed files with 49 additions and 6 deletions

View File

@@ -170,7 +170,7 @@ spec:
priorityClassName: "system-cluster-critical"
containers:
- name: app-service
image: beclab/app-service:0.5.1
image: beclab/app-service:0.5.2
imagePullPolicy: IfNotPresent
ports:
- containerPort: 6755

View File

@@ -729,6 +729,12 @@ func (h *Handler) getApplicationProviderList(req *restful.Request, resp *restful
return
}
// sys app does not have app config
if am.Spec.Config == "" {
resp.WriteAsJson([]providerRegistry{})
return
}
var appConfig appcfg.ApplicationConfig
err = am.GetAppConfig(&appConfig)
if err != nil {

View File

@@ -338,7 +338,10 @@ func (h *Handler) getGPUResourceTypeKey(gpuType string) string {
case utils.GB10ChipType:
return constants.NvidiaGB10GPU
case utils.AmdApuCardType:
return constants.AMDAPU
return constants.AMDGPU
case utils.AmdGpuCardType:
return constants.AMDGPU
default:
return ""
}

View File

@@ -31,6 +31,7 @@ import (
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/fields"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/dynamic"
@@ -587,7 +588,7 @@ func (h *HelmOps) isStartUp() (bool, error) {
}
klog.Infof("podSErvers: %v", podNames)
serverStarted, err := checkIfStartup(serverPods, true)
serverStarted, err := h.checkIfStartup(serverPods, true)
if err != nil {
klog.Errorf("v2 app %s server pods not ready: %v", h.app.AppName, err)
return false, err
@@ -606,7 +607,7 @@ func (h *HelmOps) isStartUp() (bool, error) {
return false, err
}
clientStarted, err := checkIfStartup(clientPods, false)
clientStarted, err := h.checkIfStartup(clientPods, false)
if err != nil {
return false, err
}
@@ -669,7 +670,7 @@ func (h *HelmOps) findServerPods() ([]corev1.Pod, error) {
return pods, nil
}
func checkIfStartup(pods []corev1.Pod, isServerSide bool) (bool, error) {
func (h *HelmOps) checkIfStartup(pods []corev1.Pod, isServerSide bool) (bool, error) {
if len(pods) == 0 {
return false, errors.New("no pod found")
}
@@ -678,6 +679,16 @@ func checkIfStartup(pods []corev1.Pod, isServerSide bool) (bool, error) {
for _, pod := range pods {
creationTime := pod.GetCreationTimestamp()
pendingDuration := time.Since(creationTime.Time)
pendingKind, err := h.getPendingKind(&pod)
if err != nil {
return false, err
}
if pendingKind == "hami-scheduler" {
if isServerSide {
return false, errcode.ErrServerSidePodPending
}
return false, errcode.ErrPodPending
}
if pod.Status.Phase == corev1.PodPending && pendingDuration > time.Minute*10 {
if isServerSide {
@@ -703,6 +714,28 @@ func checkIfStartup(pods []corev1.Pod, isServerSide bool) (bool, error) {
return false, nil
}
func (h *HelmOps) getPendingKind(pod *corev1.Pod) (string, error) {
fieldSelector := fields.OneTermEqualSelector("involvedObject.name", pod.Name).String()
events, err := h.client.KubeClient.Kubernetes().CoreV1().Events(pod.Namespace).List(h.ctx, metav1.ListOptions{
FieldSelector: fieldSelector,
})
if err != nil {
return "", err
}
eventFrom := ""
for _, event := range events.Items {
if event.Reason == "FailedScheduling" {
if event.ReportingController != "" {
eventFrom = event.ReportingController
} else {
eventFrom = event.Source.Component
}
break
}
}
return eventFrom, nil
}
type applicationSettingsSubPolicy struct {
URI string `json:"uri"`
Policy string `json:"policy"`

View File

@@ -87,6 +87,7 @@ const (
NvidiaGPU = "nvidia.com/gpu"
NvidiaGB10GPU = "nvidia.com/gb10"
AMDAPU = "amd.com/apu"
AMDGPU = "amd.com/gpu"
AuthorizationLevelOfPublic = "public"
AuthorizationLevelOfPrivate = "private"

View File

@@ -160,7 +160,7 @@ func (imc *ImageManagerClient) PollDownloadProgress(ctx context.Context, am *app
if t == "" {
imageSize := maxImageSize
info := findImageSize(imageList, ref.Name)
if info != nil {
if info != nil && info.Size != 0 {
//klog.Infof("get image:%s size:%d", ref.Name, info.Size)
imageSize = info.Size
}