<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>49344</bug_id>
          
          <creation_ts>2024-02-09 18:38:49 +0300</creation_ts>
          <short_desc>Не стартует nbd-server с помощью systemd</short_desc>
          <delta_ts>2024-02-16 09:20:04 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>nbd-server</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Aleksandr Sysoev">sysoevas</reporter>
          <assigned_to name="Anton Farygin">rider</assigned_to>
          <cc>rider</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>241357</commentid>
    <comment_count>0</comment_count>
    <who name="Aleksandr Sysoev">sysoevas</who>
    <bug_when>2024-02-09 18:38:49 +0300</bug_when>
    <thetext>server-10.1-x86-64 обновленный до Sisyphus
Шаги воспроизведения:
1. Добавить конфиг /etc/nbd-server/config:
[generic]
[export]
exportname = /home/test/&lt;file&gt;.iso
2. Попытаться запустить сервис nbd:
# systemctl start nbd

Ожидаемый результат: успешный старт сервиса
Реальный результат: сервис не стартует.

В journal:
фев 09 18:32:15 server-10-1-x86-64-20240209.localdomain systemd[1]: Started nbd-server.service - NBD server.
фев 09 18:32:15 server-10-1-x86-64-20240209.localdomain nbd-server[17352]: /usr/bin/nbd-server: invalid option -- &apos;D&apos;
фев 09 18:32:15 server-10-1-x86-64-20240209.localdomain nbd-server[17352]: This is nbd-server version 0.unknown

Дополнительно:
Если в /lib/systemd/system/nbd-server.service, блок [Service] поменять 
на нижеследующее, то сервис запускается и клиенты успешно подключаются:

Type=simple
EnvironmentFile=/etc/sysconfig/nbd-server
ExecStart=/usr/bin/nbd-server $OPTIONS
PIDFile=/run/nbd-server.pid</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>241502</commentid>
    <comment_count>1</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2024-02-12 15:44:02 +0300</bug_when>
    <thetext>nbd-3.25-alt2 -&gt; sisyphus:

 Mon Feb 12 2024 Anton Farygin &lt;rider@altlinux.ru&gt; 3.25-alt2
 - fixed systemd unit (closes: #49344)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>241665</commentid>
    <comment_count>2</comment_count>
    <who name="Aleksandr Sysoev">sysoevas</who>
    <bug_when>2024-02-14 18:50:24 +0300</bug_when>
    <thetext>Ошибка всё ещё актуальна.

Смог запустить сервис добавив в /lib/systemd/system/nbd-server.service строчку:
PIDFile=/run/nbd-server.pid</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>241708</commentid>
    <comment_count>3</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2024-02-16 09:20:04 +0300</bug_when>
    <thetext>nbd-3.25-alt3 -&gt; sisyphus:

 Fri Feb 16 2024 Anton Farygin &lt;rider@altlinux.ru&gt; 3.25-alt3
 - added pidfile to the systemd unit (closes: #49344)
 - content of the nbd-doc package is included in the package with client</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>