- 
                Notifications
    
You must be signed in to change notification settings  - Fork 92
 
Description
Issue Body:
Bug Description
When a new user is created in the web interface (webui service) of GeoServer Cloud, the change is not reflected in the REST API service (rest) in real-time. The REST API only recognizes the new user after the rest service pod is manually restarted.
This indicates a failure in event propagation through the Spring Cloud Bus and RabbitMQ, despite the webui and rest services being successfully connected to the RabbitMQ broker.
Environment
- GeoServer Cloud Version: 2.26.2.0
 - Deployment Environment: Azure Kubernetes Service (AKS)
 - Catalog Backend: PostgreSQL (
pgconfigprofile) - Event Bus: RabbitMQ (
bus-amqpprofile) - Orchestration: Terraform for Kubernetes manifests
 
Steps to Reproduce
- Deploy GeoServer Cloud to a Kubernetes cluster with the configuration described below.
 - Log in to the web interface (
webui). - Navigate to Security > Users, Groups, and Roles and create a new user.
 - Save the new user.
 - Query the REST API endpoint to list users (e.g., 
GET /geoserver/rest/security/users.json). 
Expected Behavior
The REST API query in step 5 should immediately return the newly created user in the list.
Current Behavior
The REST API query in step 5 does not show the new user. The user only appears in the API response after the geoserver-rest pod is manually restarted.
Diagnostic Steps Taken
- The 
SPRING_PROFILES_ACTIVEenvironment variable in thewebuiandrestdeployments was updated to includebus-amqp. The full profile string used is:pgconfig,acl,json-logs,standalone,bus-amqp. - The 
GEOSERVER_BUS_ENABLED=trueenvironment variable was added to the deployments. - Connectivity Confirmation: It was verified (by shelling into the RabbitMQ pod and listing connections) that both the 
webuipod and therestpod have active connections to the RabbitMQ broker. This confirms that the issue is not related to basic network connectivity or authentication with the broker, but likely lies within the event publishing or consumption logic. 
Relevant Configuration (Terraform HCL)
Below are snippets of the Kubernetes deployment configuration for the webui and rest services, reflecting the applied changes.
geoserver/webui/main.tf:
resource "kubernetes_deployment" "geoserver_webui" {
  metadata {
    name      = "webui"
    namespace = var.namespace
    #...
  }
  spec {
    replicas = 1
    #...
    template {
      #...
      spec {
        #...
        container {
          name  = "webui"
          image = "geoservercloud/geoserver-cloud-webui:2.26.2.0"
          env_from {
            config_map_ref {
              name = var.common_config_map_name
            }
          }
          env_from {
            secret_ref {
              name = var.common_secret_name
            }
          }
          env {
            name  = "SPRING_PROFILES_ACTIVE"
            value = "pgconfig,acl,json-logs,standalone,bus-amqp" # bus-amqp profile added
          }
          env {
            name  = "GEOSERVER_BUS_ENABLED"
            value = "true" # Added to enable the bus
          }
          #... other envs and configurations
        }
      }
    }
  }
}geoserver/rest/main.tf:
resource "kubernetes_deployment" "geoserver_rest" {
  metadata {
    name      = "rest"
    namespace = var.namespace
    #...
  }
  spec {
    replicas = 1
    #...
    template {
      #...
      spec {
        #...
        container {
          name  = "rest"
          image = "geoservercloud/geoserver-cloud-rest:2.26.2.0"
          env_from {
            config_map_ref {
              name = var.common_config_map_name
            }
          }
          env_from {
            secret_ref {
              name = var.common_secret_name
            }
          }
          env {
            name  = "SPRING_PROFILES_ACTIVE"
            value = "pgconfig,acl,json-logs,standalone,bus-amqp" # bus-amqp profile added
          }
          env {
            name  = "GEOSERVER_BUS_ENABLED"
            value = "true" # Added to enable the bus
          }
          #... other envs and configurations
        }
      }
    }
  }
}Thanks in advance for any help or guidance.