Providing access to TRS instance

RSserver module provides the following ways to access TRS instance:

  1. TRS web interface: to access TRS instance go to <IP address>:8888/trs/.
  2. RSclient: to access TRS instance via RSclient specify <IP address> in field Primary Server URI in client settings.

Mutex

Mutex is mechanism used in programming to synchronize concurrently running threads. Mutexes can be in one of two states - checked or unchecked (open and closed, respectively). When a thread owned by any process becomes the owner of the mutex object, the latter is put into an unmarked state. If a task releases a mutex, its state becomes checked. Purpose of the mutex is protecting object from access to it by other threads than the one that took possession of the mutex. At any given moment, only one thread can own an object protected by a mutex. If another thread needs access to a variable protected by a mutex, then this thread will block until the mutex is released.

The same principle is applied in RSserver. When user is connecting to instance of one project, mutex is set on this project, which prohibits access to the project at the current time until the task releases the mutex. If instance has already been assigned to the user, then mutex mechanism will not be used, since in this case synchronization is not needed.

Connection features

  1. If TRS project of the user is not specified when connecting, then first a check is made to see if there is TRS instance assigned to user, and if there is such instance, then the connection is made to it. If there is no TRS instance assigned to the user, then the search for the user’s TRS project is performed, in which a new TRS instance will be started or existing free instance will be assigned to the user.

  2. By default, connection is made to arbitrary active TRS instance of the selected TRS project, which is assigned to this user or to group of users to which this user is included.

  3. In case the user does not have a TRS instance assigned in the project to which he is connected, but has an assigned TRS volume, then volume will automatically connect to a free TRS instance, then instance will be assigned to the user. If you remove a TRS instance with a TRS volume connected, the volume will not be removed.

  4. If a user connects to a domain or TRS project of the Standard type, where there are no TRS instances assigned to him, but there are free instance, he automatically receives the assignment to free instance, in this case, a reserved TRS instance in this project is always started instead of assigned one (if project quotas are not exhausted).

  5. If the min_reserve_vm parameter is specified in a Standard type project (the number of reserved instances/volumes), then when an unoccupied TRS instance or unoccupied TRS volume is received, a new reserved instance/volume will be created if there are not left enough free instances/volumes equal to min_reserv_vm. If the min_reserve_vm parameter is not specified, then reserved TRS instances/volumes will always be created when a free instance is received.

  6. If the min_reserve_vm parameter is specified in a Standard type project, then when TRS instances/volumes assigned to the user is received, nothing changes, regardless of the min_reserve_vm parameter.

  7. If there are no free TRS instances/volumes in a Standard project, and a new TRS instance/volume is created, then there will be created reserved TRS instance/volume if the value is specified for the min_reserve_vm parameter. And it will not be generated if the value of the min_reserve_vm parameter is missing.

  8. If there are no TRS instances available (with statuses Active, Paused , Shutoff) assigned to the user in the domain or TRS project of Simultaneous type to which the user is connected, then the connection will not be produced. The connection is made only to TRS instance assigned to this user.

  9. If there are no active TRS instances in the domain or TRS project of any type to which user is connecting, but there is TRS instance assigned to the user in the Paused status, the client sends a request to unpause this TRS instances.

  10. If there are no active TRS instances in the domain or TRS project of any type to which the user is connecting, but there is TRS instance assigned to this user in the Shutoff status, the client sends a request to start TRS instance.

  11. If in the TRS project to which the user with user rights is connecting, the default flavor with zero root disk is selected and there are no free TRS instances, then new TRS instance will not be started. According to the OpenStack policy, launching new instances with flavor that has a zero root disk is available only to the administrator, this policy is configured in the file /etc/nova/policy.json.

  12. To restrict user access to TRS instance, when connecting to a TRS Standard type project, security group is created, which includes rules that allow the user to access TRS instance assigned to him:

    Direction Ethernet type IP protocol Port range Remote IP prefix Remote security group
    Ingress IPv4 ICMP Any <source_ip>/32
    Ingress IPv4 TCP 1 - 65535 <source_ip>/32
    Ingress IPv4 UDP 1 - 65535 <source_ip>/32
    Egress IPv4 ICMP Any <source_ip>/32
    Egress IPv4 TCP 1 - 65535 <source_ip>/32
    Egress IPv4 UDP 1 - 65535 <source_ip>/32

Important

According to security policies in OpenStack Train, only the Administrator has the right to create and launch instances without a disk and with a root disk equal to 0.