erl_boot_server — kernel v11.0.3

Search documentation of kernel

# erl_boot_server (kernel v11.0.3)

Copy Markdown View Source

Boot server for other Erlang machines.

This server is used to assist diskless Erlang nodes that fetch all Erlang code from another machine.

This server is used to fetch all code, including the start script, if an Erlang runtime system is started with command-line flag `-loader inet`. All hosts specified with command-line flag `-hosts Host` must have one instance of this server running.

This server can be started with the Kernel configuration parameter `start_boot_server`.

The `erl_boot_server` can read regular files and files in archives. See `code` and `erl_prim_loader` in ERTS.

#### Warning

The support for loading code from archive files is experimental. It is released before it is ready to obtain early feedback. The file format, semantics, interfaces, and so on, can be changed in a future release.

## SEE ALSO

`erts:init`, `erts:erl_prim_loader`

## Summary

### Functions

add_slave(Slave)

Adds a `Slave` node to the list of allowed slave hosts.

delete_slave(Slave)

Deletes a `Slave` node from the list of allowed slave hosts.

start(Slaves)

The same as `start(Slaves, #{})`.

start(Slaves, Options)

Starts the boot server. `Slaves` is a list of IP addresses for hosts, which are allowed to use this server as a boot server. `Options` is a map with configuration options.

start_link(Slaves)

The same as `start_link(Slaves, #{})`.

start_link(Slaves, Options)

The same as `start(Slaves, Options)`, but it also links to the caller.

which_slaves()

Returns the current list of allowed slave hosts.

## Functions

# add_slave(Slave)

    -spec add_slave(Slave) -> ok | {error, Reason}
                       when
                           Slave :: Host,
                           Host :: inet:ip_address() | inet:hostname(),
                           Reason :: {badarg, Slave}.

Adds a `Slave` node to the list of allowed slave hosts.

# delete_slave(Slave)

    -spec delete_slave(Slave) -> ok | {error, Reason}
                          when
                              Slave :: Host,
                              Host :: inet:ip_address() | inet:hostname(),
                              Reason :: {badarg, Slave}.

Deletes a `Slave` node from the list of allowed slave hosts.

# start(Slaves)

    -spec start(Slaves) -> {ok, Pid} | {error, Reason}
                   when
                       Slaves :: [Host],
                       Host :: inet:ip_address() | inet:hostname(),
                       Pid :: pid(),
                       Reason :: any().

The same as `start(Slaves, #{})`.

# start(Slaves, Options)

(since OTP 29.0)

    -spec start(Slaves, Options) -> {ok, Pid} | {error, Reason}
                   when
                       Slaves :: [Host],
                       Host :: inet:ip_address() | inet:hostname(),
                       Options :: #{listen_port => inet:port_number()},
                       Pid :: pid(),
                       Reason :: any().

Starts the boot server. `Slaves` is a list of IP addresses for hosts, which are allowed to use this server as a boot server. `Options` is a map with configuration options.

The boot server listening port can be configured with `listen_port`. If an empty map is provided, or `listen_port` is zero, then an ephemeral port is used.

# start_link(Slaves)

    -spec start_link(Slaves) -> {ok, Pid} | {error, Reason}
                        when
                            Slaves :: [Host],
                            Host :: inet:ip_address() | inet:hostname(),
                            Pid :: pid(),
                            Reason :: any().

The same as `start_link(Slaves, #{})`.

# start_link(Slaves, Options)

(since OTP 29.0)

    -spec start_link(Slaves, Options) -> {ok, Pid} | {error, Reason}
                        when
                            Slaves :: [Host],
                            Host :: inet:ip_address() | inet:hostname(),
                            Options :: #{listen_port => inet:port_number()},
                            Pid :: pid(),
                            Reason :: any().

The same as `start(Slaves, Options)`, but it also links to the caller.

# which_slaves()

    -spec which_slaves() -> Slaves
                          when
                              Slaves :: [Slave],
                              Slave :: {Netmask :: inet:ip_address(), Address :: inet:ip_address()}.

Returns the current list of allowed slave hosts.