5

I am using app.yaml file to configure my app engine. Below is the file.

runtime: java
env: flex

resources:
    memory_gb: 6.5
    cpu: 5
    disk_size_gb: 20
automatic_scaling: 
    min_num_instances: 6 
    max_num_instances: 8
    cpu_utilization: 
    target_utilization: 0.6
handlers:
    - url: /.*
    script: this field is required, but ignored

network:
     session_affinity: true

Now when I click the "view" link for the version list in the cloud console, I can see below config.

runtime: java
api_version: '1.0'
env: flexible
threadsafe: true
handlers:
   - url: /.*
   script: 'this field is required, but ignored'
automatic_scaling:
  cool_down_period: 120s
  min_num_instances: 6
  max_num_instances: 8
  cpu_utilization:
   target_utilization: 0.6
 network: {}
 resources:
     cpu: 5
     memory_gb: 6.5
    disk_size_gb: 20
 liveness_check:
    initial_delay_sec: 300
    check_interval_sec: 30
    timeout_sec: 4
    failure_threshold: 4
    success_threshold: 2
 readiness_check:
    check_interval_sec: 5
    timeout_sec: 4
    failure_threshold: 2
    success_threshold: 2
    app_start_timeout_sec: 300

So as you can see network property is still blank, if i change others parameters like cpu , min_num_instances all others properties are getting reflected except below one not sure why ?.

 network:
  session_affinity: true
Harish Bagora
  • 476
  • 4
  • 20

2 Answers2

4

Actually this is a known issue for App Engine, the status can be tracked at this link

You can use gcloud beta app deploy as a workaround to get the session affinity working until the issue is resolved

Andres S
  • 742
  • 4
  • 8
0

You may need to add an instance_tag and a name. The others are optional:

network:
  instance_tag: TAG_NAME
  name: NETWORK_NAME
  session_affinity: true (optional)
  subnetwork_name: SUBNETWORK_NAME (optional)
  forwarded_ports: (optional)
    - PORT
    - HOST_PORT:CONTAINER_PORT
    - PORT/tcp
    - HOST_PORT:CONTAINER_PORT/udp
GAEfan
  • 10,514
  • 2
  • 13
  • 28
  • I added "instance_tag" and "name" property along with "session_affinity" then also under network only these two instance_tag and name are visible. session_affinity is optional but if i added so it should show in configuration isn't it ? – Harish Bagora Jun 26 '20 at 08:05