docs/doc/source/system_configuration/kubernetes/configuring-ptp-service-using-the-cli.rst
Ron Stone 3dbc75a4d6 Enhance PTP features to support 5G Time SyncE Solution - Phase 2
Add mention of Logan Beach NIC in all PTP contexts where Westport
Channel NIC is currenty mentioned.

Signed-off-by: Ron Stone <ronald.stone@windriver.com>
Change-Id: I9952a6803a11bd0982a0ac853a69826e8b121b34
2022-06-13 14:35:00 -04:00

10 KiB

Configure PTP Service Using the CLI

You can use the CLI to configure services.

PTP Service

To view the existing status, use the following commands.

~(keystone_admin)]$ system ptp-instance-list

~(keystone_admin)]$ system host-ptp-instance-list <host>

Warning

and are mutually exclusive on a particular host; only one can be enabled at any time.

The default value for clock_synchronization is ntp. Use the following command to change the clock synchronization on the host. and are configured per host. Lock/unlock the host when updating.

~(keystone_admin)]$ system host-update controller-0 clock_synchronization=ptp
+-----------------------+---------------------------------------+
| Property              | Value                                 |
+-----------------------+---------------------------------------+
| action                | none                                  |
| administrative        | unlocked                              |
| availability          | available                             |
| bm_ip                 | None                                  |
| bm_type               | None                                  |
| bm_username           | None                                  |
| boot_device           | /dev/disk/by-path/pci-0000:04:00.0-sas|
|                       |   -0x5001e6754aa38000-lun-0           |
| capabilities          | {u'stor_function': u'monitor'}        |
| clock_synchronization | ptp                                   |
| config_applied        | 590f29ad-19e2-43ee-855e-f765814e3ecd  |
| config_status         | None                                  |
| config_target         | 590f29ad-19e2-43ee-855e-f765814e3ecd  |
| console               | ttyS0,115200n8                        |
| created_at            | 2019-12-07T18:32:58.752361+00:00      |
| hostname              | controller-0                          |
| id                    | 1                                     |
| install_output        | text                                  |
| install_state         | None                                  |
| install_state_info    | None                                  |
| inv_state             | inventoried                           |
| invprovision          | provisioned                           |
| location              | {}                                    |
| mgmt_ip               | 192.168.204.3                         |
| mgmt_mac              | 00:1e:67:54:aa:39                     |
| operational           | enabled                               |
| personality           | controller                            |
| reserved              | False                                 |
| rootfs_device         | /dev/disk/by-path/pci-0000:04:00.0    |
|                       |   -sas-0x5001e6754aa38000-lun-0       |
| serialid              | None                                  |
| software_load         | nn.nn                                 |
| task                  |                                       |
| tboot                 | false                                 |
| ttys_dcd              | None                                  |
| updated_at            | 2019-12-07T21:17:28.627489+00:00      |
| uptime                | 9020                                  |
| uuid                  | 92c86da2-adb7-4fb2-92fc-82759e25108d  |
| vim_progress_status   | services-enabled                      |
+-----------------------+---------------------------------------+

To view the service configuration, use the following command:

~(keystone_admin)]$ system host-show controller-0
+-----------------------+------------------------------------------------+
| Property              | Value                                          |
+-----------------------+------------------------------------------------+
| action                | none                                           |
| administrative        | unlocked                                       |
| availability          | available                                      |
| bm_ip                 | None                                           |
| bm_type               | None                                           |
| bm_username           | None                                           |
| boot_device           | /dev/disk/by-path/pci-0000:04:00.0-sas         |
|                       |-0x5001e6754aa38000-lun-0                       |
| capabilities          | {u'stor_function': u'monitor', u'Personality': |
|                       | u'Controller-Active'}                          |
| clock_synchronization | ptp                                            |
| config_applied        | 590f29ad-19e2-43ee-855e-f765814e3ecd           |
| config_status         | Config out-of-date                             |
| config_target         | cd18ec25-c030-4b0c-862b-c39726275743           |
| console               | ttyS0,115200n8                                 |
| created_at            | 2019-12-09T16:10:19.143372+00:00               |
| hostname              | controller-0                                   |
| id                    | 1                                              |
| install_output        | text                                           |
| install_state         | None                                           |
| install_state_info    | None                                           |
| inv_state             | inventoried                                    |
| invprovision          | provisioned                                    |
| location              | {}                                             |
| mgmt_ip               | 192.168.204.3                                  |
| mgmt_mac              | 00:1e:67:54:aa:39                              |
| operational           | enabled                                        |
| personality           | controller                                     |
| reserved              | False                                          |
| rootfs_device         | /dev/disk/by-path/pci-0000:04:00.0-sas         |
|                       | -0x5001e6754aa38000-lun-0                      |
| serialid              | None                                           |
| software_load         | nn.nn                                          |
| task                  |                                                |
| tboot                 | false                                          |
| ttys_dcd              | None                                           |
| updated_at            | 2019-12-10T14:55:58.595239+00:00               |
| uptime                | 159970                                         |
| uuid                  | 92c86da2-adb7-4fb2-92fc-82759e25108d           |
| vim_progress_status   | services-enabled                               |
+-----------------------+------------------------------------------------+

PTP Instance Configuration

instances are the top level configuration unit. The supported instance types are:

ptp4l

Represents an instance of ptp4l. A node may have several of these instances.

phc2sys

Represents an instance of phc2sys. A node will generally only have one of these.

ts2phc

Represents an instance of ts2phc.

clock

clock is not an daemon or service, but instead an abstract unit used to hold the interfaces and configuration for setting Westport Channel or Logan Beach NIC control parameters (syncE and PPS transmission).

Valid instance level parameters are found in the man pages for each service, under:

  • GLOBAL OPTIONS - ptp4l
  • OPTIONS - phc2sys
  • GLOBAL OPTIONS - ts2phc
  • None for clock

Set host to use :

~(keystone_admin)]$ system host-update controller-0 clock_synchronization=ptp

Create an instance and assigning parameters

  1. Create an instance by providing a name and type.

    ~(keystone_admin)]$ system ptp-instance-add myptp1 ptp4l
  2. Add any required instance level parameters.

    ~(keystone_admin)]$ system ptp-instance-parameter-add myptp1 domainNumber=24 slaveOnly=0

Create an interface and assign to ports

  1. Create an interface unit by providing a name and assigning it to an instance.

    ~(keystone_admin)]$ system ptp-interface-add ptpinterface myptp1
  2. Add ports to the interface.

    ~(keystone_admin)]$ system host-if-ptp-assign controller-0 oam0 ptpinterface
  3. Add interface level parameters as required.

    ~(keystone_admin)]$ system ptp-interface-parameter-add ptpinterface masterOnly=1

    Note

    Multiple ports may be assigned to an interface in order to simplify parameter application.

    ~(keystone_admin)]$ system host-if-ptp-assign controller-0 data0 ptpinterface
    ~(keystone_admin)]$ system ptp-interface-show ptpinterface
  4. Assign the instance to a host and apply the configuration.

    1. Assign the instance to a host so that the configuration can be applied.

      ~(keystone_admin)]$ system host-ptp-instance-assign controller-0 myptp1
    2. Apply the configuration and verify that it completed.

      ~(keystone_admin)]$ system ptp-instance-apply
      ~(keystone_admin)]$ fm alarm-list