Bug 1169083 - yaws unit file doesn't work
Summary: yaws unit file doesn't work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: yaws
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Antoine Catton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1169079
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-30 02:35 UTC by Antoine Catton
Modified: 2015-04-26 19:37 UTC (History)
4 users (show)

Fixed In Version: yaws-1.98-5.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-26 19:37:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Rename unit file to allow instance specification (Bug #1169079) (3.02 KB, patch)
2014-11-30 02:38 UTC, Antoine Catton
no flags Details | Diff
Remove /usr/bin/echo from stop and reload commands (993 bytes, patch)
2014-11-30 02:39 UTC, Antoine Catton
no flags Details | Diff
Use instance id instead of configuration file (1001 bytes, patch)
2014-11-30 02:41 UTC, Antoine Catton
no flags Details | Diff
Remove forking and let systemd manage the process (1023 bytes, patch)
2014-11-30 02:42 UTC, Antoine Catton
no flags Details | Diff

Description Antoine Catton 2014-11-30 02:35:49 UTC
Description of problem:
yaws unit file doesn't work

Version-Release number of selected component (if applicable):
1.98.2.el7.x86_64

How reproducible:


Steps to Reproduce:
1. sudo yum install yaws
2. sudo systemctl start yaws
3.

Actual results:
Yaws fails to start


Expected results:
Yaws should start


Additional info:
#1169079 is the tip of the iceberg.

Comment 1 Antoine Catton 2014-11-30 02:38:22 UTC
Created attachment 962847 [details]
Rename unit file to allow instance specification (Bug #1169079)

This is the patch submited in #1169079

Comment 2 Antoine Catton 2014-11-30 02:39:54 UTC
Created attachment 962848 [details]
Remove /usr/bin/echo from stop and reload commands

$ systemctl stop yaws@instance
$ systemctl start yaws@instance

Actually do nothing more than echoing the expected command in journald.

Comment 3 Antoine Catton 2014-11-30 02:41:35 UTC
Created attachment 962849 [details]
Use instance id instead of configuration file

$ yaws --id name

allows to run multiple instances of yaws (otherwise they get the "default" id) and is the correct way to stop/reload an instance.

Comment 4 Antoine Catton 2014-11-30 02:42:38 UTC
Created attachment 962850 [details]
Remove forking and let systemd manage the process

This remove the workaround of forking. By passing "-noinput" to erl, the shell doesn't start and /dev/null can be provided as the input without any problem.

Comment 5 Antoine Catton 2014-11-30 02:46:16 UTC
There still are some problem with selinux though, I'm trying to work on in but if someone is better at selinux than I am, that would help:

Nov 29 19:18:35 localhost.localdomain yaws[12828]: =INFO REPORT==== 29-Nov-2014::19:18:35 ===
Nov 29 19:18:35 localhost.localdomain yaws[12828]: Yaws: Using config file /etc/yaws/yaws.conf
Nov 29 19:18:35 localhost.localdomain yaws[12828]: =ERROR REPORT==== 29-Nov-2014::19:18:35 ===
Nov 29 19:18:35 localhost.localdomain yaws[12828]: Failed to mkdir "/var/lib/yaws/.yaws": {error,eacces}
Nov 29 19:18:35 localhost.localdomain yaws[12828]: =ERROR REPORT==== 29-Nov-2014::19:18:35 ===
Nov 29 19:18:35 localhost.localdomain yaws[12828]: Failed to mkdir "/var/lib/yaws/.yaws": {error,eacces}
Nov 29 19:18:35 localhost.localdomain yaws[12828]: =ERROR REPORT==== 29-Nov-2014::19:18:35 ===
Nov 29 19:18:35 localhost.localdomain yaws[12828]: Cannot open "/var/log/yaws/yaws.auth"
Nov 29 19:18:35 localhost.localdomain yaws[12828]: =ERROR REPORT==== 29-Nov-2014::19:18:35 ===
Nov 29 19:18:35 localhost.localdomain yaws[12828]: Cannot open "/var/log/yaws/yaws.access"
Nov 29 19:18:35 localhost.localdomain yaws[12828]: =INFO REPORT==== 29-Nov-2014::19:18:35 ===
[…]
Nov 29 19:18:37 localhost.localdomain systemd[1]: yaws: main process exited, code=exited, status=1/FAILURE
Nov 29 19:18:37 localhost.localdomain yaws[12857]: You failed to read the ctlfile /var/lib/yaws/.yaws/yaws/yaws/CTL

It would be nice to create an selinux policies which would authorize yaws to write in /var/lib/yaws/ and /var/log/yaws/. This would fix everything (after my patches are applied)

Comment 6 Lubomir Rintel 2014-12-01 08:21:11 UTC
The patches look good to me.

I'm not going to fix the SELinux one, as yaws is currently only in EPEL and selinux-policy is not. Please open a separate ticket against selinux-policy package in RHEL.

I'm wondering if you'd be willing to maintain the package (and eventually revive it in Fedora too)?

Comment 7 Antoine Catton 2014-12-01 09:14:57 UTC
Lubomir,

I would love to maintain it. But this would be my first fedora/red hat package I would be maintaining, I might need a mentor.

Thanks.

Comment 8 Peter Lemenkov 2014-12-01 09:49:15 UTC
(In reply to Antoine Catton from comment #7)
> Lubomir,
> 
> I would love to maintain it. But this would be my first fedora/red hat
> package I would be maintaining, I might need a mentor.

That's not a problem. We'd love to take care of you. My opinion is that an unpractised maintainer with a real-world experience with the package is much more valuable than experienced maintainer who doesn't use the package he is trying to take care of.

So if you're interested and willing to participate then you're more than welcome!

You should start from getting FAS account.

https://fedoraproject.org/wiki/Account_System

Comment 9 Antoine Catton 2014-12-03 03:05:28 UTC
(In reply to Peter Lemenkov from comment #8)
> (In reply to Antoine Catton from comment #7)
> 
> You should start from getting FAS account.
> 
> https://fedoraproject.org/wiki/Account_System

I created the account. What is the next step?

Comment 10 Lubomir Rintel 2014-12-03 11:11:40 UTC
(In reply to Antoine Catton from comment #9)
> (In reply to Peter Lemenkov from comment #8)
> > (In reply to Antoine Catton from comment #7)
> > 
> > You should start from getting FAS account.
> > 
> > https://fedoraproject.org/wiki/Account_System
> 
> I created the account. What is the next step?

You should have gotten a confirmation mail that you've been added to the "packager" group. Now please configure your GIT and Koji (build system) access: add SSH keys to your account and get Koji certificates.

Then familiarize yourself with "fedpkg" -- it's a nice wrapper around Git, Koji client, updates tool client etc. Clone a package with it, apply your changes, push them to Git and trigger a build. Also, you can submit an update if you like.

See here for detailed information: https://fedoraproject.org/wiki/Join_the_package_collection_maintainers

Also, if you'd like to revive the Fedora devel package (it has been retired as unmaintained in master), please file a "Package change request" as described here: http://fedoraproject.org/wiki/Package_SCM_admin_requests

Thank you!

Comment 11 Antoine Catton 2014-12-07 06:35:50 UTC
I just pushed my bugfixes. Should I close this bug or make it depend on a bug that I would open with selinux-policy?

Comment 12 Lubomir Rintel 2014-12-07 15:28:10 UTC
(In reply to Antoine Catton from comment #11)
> I just pushed my bugfixes. Should I close this bug or make it depend on a
> bug that I would open with selinux-policy?

I can't see neither builds nor updates for yaws yet.

If you just pushed them to Git, please use MODIFIED state in Bugzilla.

Comment 13 Antoine Catton 2014-12-07 21:35:52 UTC
Sorry, I thought there were git hooks when I pushed. I manually ran the build.

Comment 14 Lubomir Rintel 2014-12-08 09:25:38 UTC
Now, if you believe that the build should be pushed as an update, you need to add it to the update system. Either run "fedpkg update" or fill it in here: https://admin.fedoraproject.org/updates/

Comment 15 Fedora Update System 2014-12-13 06:58:05 UTC
yaws-1.98-3.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/yaws-1.98-3.el7

Comment 16 Fedora Update System 2014-12-14 22:06:25 UTC
Package yaws-1.98-3.el7:
* should fix your issue,
* was pushed to the Fedora EPEL 7 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing yaws-1.98-3.el7'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2014-4670/yaws-1.98-3.el7
then log in and leave karma (feedback).

Comment 17 Fedora Update System 2015-04-06 02:58:26 UTC
yaws-1.98-5.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/yaws-1.98-5.el7

Comment 18 Fedora Update System 2015-04-26 19:37:48 UTC
yaws-1.98-5.el7 has been pushed to the Fedora EPEL 7 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.