Skip to content
This repository has been archived by the owner on Jan 18, 2019. It is now read-only.

Migrate to Alpine #2

Closed
blacklabelops opened this issue Feb 17, 2016 · 8 comments
Closed

Migrate to Alpine #2

blacklabelops opened this issue Feb 17, 2016 · 8 comments

Comments

@blacklabelops
Copy link
Contributor

This image is a side-car container and the image size should be minimal.

This image will be migrated from CentOS to Alpine in order to achieve this.

@cguentherTUChemnitz
Copy link

Are there any news to the migration plan? I see an existing DockerfileAlpine but no specific tag in dockerhub.

blacklabelops pushed a commit that referenced this issue Oct 5, 2016
blacklabelops pushed a commit that referenced this issue Oct 5, 2016
@blacklabelops
Copy link
Contributor Author

Can't remember why i left it unfinished, but here it is!

@cguentherTUChemnitz
Copy link

Thanks for your efforts!

@cguentherTUChemnitz
Copy link

Are you able to run the apline image? My container log ends with:

Using legacy jobber file format.
Got jobs section
Failed to load jobs for Invalid 'month' value:strconv.ParseInt: parsing "Mon": invalid syntax: root
Loaded 0 new jobs for bin.
Loaded 0 new jobs for daemon.
Loaded 0 new jobs for adm.
Loaded 0 new jobs for lp.
Loaded 0 new jobs for sync.
Loaded 0 new jobs for shutdown.
Loaded 0 new jobs for halt.
Loaded 0 new jobs for mail.
Loaded 0 new jobs for news.
Loaded 0 new jobs for uucp.
Loaded 0 new jobs for operator.
Loaded 0 new jobs for man.
Loaded 0 new jobs for postmaster.
Loaded 0 new jobs for cron.
Loaded 0 new jobs for ftp.
Failed to load jobs for open /dev/null/.jobber: not a directory: sshd
Loaded 0 new jobs for at.
Loaded 0 new jobs for squid.
Loaded 0 new jobs for xfs.
Loaded 0 new jobs for games.
Loaded 0 new jobs for postgres.
Loaded 0 new jobs for nut.
Loaded 0 new jobs for cyrus.
Loaded 0 new jobs for vpopmail.
Loaded 0 new jobs for ntp.
Loaded 0 new jobs for smmsp.
Failed to load jobs for open /dev/null/.jobber: not a directory: guest
Loaded 0 new jobs for nobody.
Loaded 0 new jobs for jobber_client.
totalJobs: -3; len(m.jobs): 0
New context: 0.0
Main thread context: 0.0
New context: 0.0.0```

@blacklabelops
Copy link
Contributor Author

Hi!

You using an old example with an invalid cron string. "Mon" is not understood by jobber. I had to replace cron under alpine with jobber.

Please try this:

$ docker run -d \
  --volumes-from jenkins_jenkins_1 \
  --name backupdemon \
  -v $(pwd)/snapshots/:/snapshots \
    -e "BACKUP_DIRECTORIES=/jenkins/ jenkins_jenkins_1/" \
  -e "CRON_HOURLY=0 20 * * * *" \
  -e "CRON_DAILY=0 0 2 1 * *" \
  -e "CRON_WEEKLY=0 0 1 * * 1" \
  -e "CRON_MONTHLY=0 0 3 20 * *" \
    blacklabelops/rsnapshotd

@cguentherTUChemnitz
Copy link

cguentherTUChemnitz commented Oct 5, 2016

You are right. Now the

Failed to load jobs for Invalid 'month' value:strconv.ParseInt: parsing "Mon": invalid syntax: root

message disapeared.

Nevertheless the two messages still remain:

Failed to load jobs for open /dev/null/.jobber: not a directory: sshd

and

Failed` to load jobs for open /dev/null/.jobber: not a directory: guest

@blacklabelops
Copy link
Contributor Author

Jobber is not made for Docker containers with single users and single process. Rather it retrieves a list of users and scans directories for Jobber job files. Even inside directories where Jobber has no access rights. Those messages are no errors but warnings.

What's important is that at least the 4 jobs for rsnapshot are loaded. That should be the case. You can also test Jobbers execution:

Enter the container:
$ docker exec -it yourrsnapshotcontainer bash
List Jobber Jobs:
$ jobber list
Test Rsnapshot execution:
$ jobber test Hourly

Have fun!

@cguentherTUChemnitz
Copy link

Thanks for the clarification.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants