Skip to content

roles: server doesn't change server address after reload #209

Closed
@themilchenko

Description

@themilchenko

Now http role can't change address or port of http server while instance running (with config:reload(), for example).

Reproducer

There is a config with httpd role:

app:
  file: 'init.lua'

groups:
  group001:
    replicasets:
      replicaset001:
        instances:
          instance001:
            roles: [roles.httpd]
            roles_cfg:
              roles.httpd:
                default:
                  listen: '127.0.0.1:8080'
            iproto:
              listen:
              - uri: '127.0.0.1:3301'

Let's start instance:

$ tt start app

Now I want to change a port of default server:

<                   listen: '127.0.0.1:8080'
---
>                   listen: '127.0.0.1:8081'

And apply config with config:reload() command on running instance:

$ tt connect app
app> require('config'):reload()

And check if port was changed:

$ lsof -i :8080 
COMMAND      PID      USER FD   TYPE  DEVICE SIZE/OFF NODE NAME
tarantool 221085 milchenko 25u  IPv4 1361754      0t0  TCP localhost:http-alt (LISTEN)
$ lsof -i :8081

And it's not. Need to fix changing a port of address without restarting an instnace.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions