Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrading RPM caused zfs service removed #314

Closed
fajarnugraha opened this issue Jul 7, 2011 · 0 comments
Closed

upgrading RPM caused zfs service removed #314

fajarnugraha opened this issue Jul 7, 2011 · 0 comments
Milestone

Comments

@fajarnugraha
Copy link
Contributor

Current zfs rpm has this scripts (defined on zfs.spec.in):

# rpm -q --scripts zfs
postinstall scriptlet (using /bin/sh):
[ -x /sbin/chkconfig ] && /sbin/chkconfig --add zfs
exit 0
preuninstall scriptlet (using /bin/sh):
[ -x /sbin/chkconfig ] && /sbin/chkconfig --del zfs
exit 0

This caused problems on upgrade using RPM:

  • new version will run chkconfig --add, which has no effect (since the service was already added)
  • old version will run chkconfig --del, which caused zfs service removed

Proposed fix: only run "chkconfig --del" on complete uninstall, by checking the value of "$1" to %preun, which will be "0" on uninstall, "1" on upgrade (reference: http://www.rpm.org/max-rpm/s1-rpm-inside-scripts.html)

fajarnugraha@9139919

mmaybee pushed a commit to mmaybee/openzfs that referenced this issue Apr 6, 2022
…penzfs#314)

If a zettacache insert fails due to block allocation failure (cache
full), it is counted as an insertion, and shows up in the `CACHE-INSERT`
columns of `zcache stats`.

This commit changes the accounting so that these failures show up as
`INSERT-DROPS alloc`.

Bonus changes:
* `INSERT-DROPS full-q` is renamed to `INSERT-DROPS buffer`, to match
the `BUF-BYTES-USED` column (soon to be `BUFFER-USED`, see openzfs#313).
* The same problem occurs if we hit the the hard limit of pending
changes memory use.  Since this is expected to be very rare, rather
than adding another column of output, we account it with `INSERT-DROPS
alloc`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants