Skip to content

fix buffer::list::zero(unsigned o, unsigned l) to act on all buffer::ptr#53

Merged
liewegas merged 1 commit intomasterfrom
unknown repository
Feb 14, 2013
Merged

fix buffer::list::zero(unsigned o, unsigned l) to act on all buffer::ptr#53
liewegas merged 1 commit intomasterfrom
unknown repository

Conversation

@ghost
Copy link

@ghost ghost commented Feb 14, 2013

When buffer::list::zero was called on a buffer::list with "ABC" and
"DEF" in two different buffer::ptr with buffer::list::zero(4, 1) it
did nothing. The expected result is that the "DEF" buffer::ptr is
modified to "D\0F"

The test to check if the pointer is past the end of range to be zeroed
was reversed. It was o+l >= p which would always be true if the range
spans over the first buffer::ptr . It must be "o+l <= p" meaning the
pointer is past the end of the range and there is no need to loop over
the remaining buffer::ptr in the buffer::list

The p+it->length() >= o+l part of the if (p >= o && p+it->length() >=
o+l) test was also reversed. When called on "ABC" with zero(0, 1) it
would match because the range to be zeroed is contained in the
buffer::ptr. The call to it->zero() would zero the entire buffer::ptr
instead of just the first character.

unit tests are added to demonstrate the two problems with the previous
code and show that the patch fixes them.

http://tracker.ceph.com/issues/4123 refs #4123

Signed-off-by: Loic Dachary loic@dachary.org

When buffer::list::zero was called on a buffer::list with "ABC" and
"DEF" in two different buffer::ptr with buffer::list::zero(4, 1) it
did nothing. The expected result is that the "DEF" buffer::ptr is
modified to "D\0F"

The test to check if the pointer is past the end of range to be zeroed
was reversed. It was o+l >= p which would always be true if the range
spans over the first buffer::ptr . It must be "o+l <= p" meaning the
pointer is past the end of the range and there is no need to loop over
the remaining buffer::ptr in the buffer::list

The p+it->length() >= o+l part of the if (p >= o && p+it->length() >=
o+l) test was also reversed. When called on "ABC" with zero(0, 1) it
would match because the range to be zeroed is contained in the
buffer::ptr. The call to it->zero() would zero the entire buffer::ptr
instead of just the first character.

unit tests are added to demonstrate the two problems with the previous
code and show that the patch fixes them.

http://tracker.ceph.com/issues/4123 refs #4123

Signed-off-by: Loic Dachary <loic@dachary.org>
liewegas added a commit that referenced this pull request Feb 14, 2013
fix buffer::list::zero(unsigned o, unsigned l) to act on all buffer::ptr

Backport: bobtail
Reviewed-by: Sage Weil <sage@inktank.com>
@liewegas liewegas merged commit ffbc085 into ceph:master Feb 14, 2013
XinzeChi pushed a commit to XinzeChi/ceph that referenced this pull request Jan 29, 2016
PrioritizedQueue optimization and some trivial optimization
liewegas pushed a commit that referenced this pull request Dec 14, 2016
use notcmalloc to fix leak checking
chardan pushed a commit to chardan/ceph that referenced this pull request Jun 6, 2017
Plotly (https://plot.ly/javascript/) does not have the licensing
problems discussed in ceph#53.  Furthermore, it has more features and plot
styles, which will be useful later, like in ceph#36.

In this commit I tried to keep the styling similar to the one with
Highlights.  I made small changes, that I consider improvements, like
making the plot adapt automatically to the window size -- including on
resize.
tspmelo pushed a commit to tspmelo/ceph that referenced this pull request Jan 31, 2018
mgr/dashboard_v2: Don't use localized config for auth
ivancich added a commit to ivancich/ceph-fork that referenced this pull request May 9, 2018
030ee12c46 Allow the dmclock library to handle the "cost" of an operation/request. This is in contrast to just measuring ops. If the cost is set at the value 1, then it's equivalent to the old code.
c7e4470 Update .gitignore to deal with cscope files.
3b5e95d Merge pull request ceph#53 from yzhan298/mod-parameter
6a4a8e7 Change a variable name from delay to finishing_check_period
c4334e5 Merge pull request ceph#52 from Rubonnek/pass-by-reference
2358ec4 Added const references to various function parameters

git-subtree-dir: src/dmclock
git-subtree-split: 030ee12c460bf9a26bb8061b1cd9460a539cc76b
ivancich added a commit to ivancich/ceph-fork that referenced this pull request May 10, 2018
17662d86c5 Allow the dmclock library to handle the "cost" of an operation/request. This is in contrast to just measuring ops. If the cost is set at the value 1, then it's equivalent to the old code.
c7e4470 Update .gitignore to deal with cscope files.
3b5e95d Merge pull request ceph#53 from yzhan298/mod-parameter
6a4a8e7 Change a variable name from delay to finishing_check_period
c4334e5 Merge pull request ceph#52 from Rubonnek/pass-by-reference
2358ec4 Added const references to various function parameters

git-subtree-dir: src/dmclock
git-subtree-split: 17662d86c51e4f40ade9ce1ab75bb49b9ecb285f
ivancich added a commit to ivancich/ceph-fork that referenced this pull request May 11, 2018
effea49 Merge pull request ceph#46 from ivancich/wip-add-cost
6f8e3d6 Allow the dmclock library to handle the "cost" of an operation/request. This is in contrast to just measuring ops. If the cost is set at the value 1, then it's equivalent to the old code.
3d777c1 Merge pull request ceph#55 from ceph/wip-da-sca-20180425
c7e4470 Update .gitignore to deal with cscope files.
3b5e95d Merge pull request ceph#53 from yzhan298/mod-parameter
653d149 misc: mark constructors as explicit
6a4a8e7 Change a variable name from delay to finishing_check_period
c4334e5 Merge pull request ceph#52 from Rubonnek/pass-by-reference
2358ec4 Added const references to various function parameters

git-subtree-dir: src/dmclock
git-subtree-split: effea49
galsalomon66 referenced this pull request in galsalomon66/ceph Sep 17, 2022
* in case of the following: /( 1 == 1) == true/  AST should handle the case of operand of type predicate while creating subtree for compare-operation; meaning the left-side reside on condQ and not in exprQ

Signed-off-by: gal salomon <gal.salomon@gmail.com>

* s3select: support true/false keywords

Signed-off-by: Albin Antony <aantony@redhat.com>

* remove condQ; all statements logical predicates and non logical predicates using the same queue(exprQ); projection column can be predicate

Signed-off-by: gal salomon <gal.salomon@gmail.com>

* not operator can handle variable

Signed-off-by: gal salomon <gal.salomon@gmail.com>

* adding test for not operator ; predicate on projection

Signed-off-by: gal salomon <gal.salomon@gmail.com>

* multi-row tests

Signed-off-by: Albin Antony <aantony@redhat.com>

* support bool cast

Signed-off-by: Albin Antony <aantony@redhat.com>

* reject arithmetic operations with bool

Signed-off-by: Albin Antony <aantony@redhat.com>

* bug fix: numeric to bool type

Signed-off-by: Albin Antony <aantony@redhat.com>

* enable alias to predicate as projection, i.e. as other projections also predicates could reference by alias

Signed-off-by: gal salomon <gal.salomon@gmail.com>

Co-authored-by: gal salomon <gal.salomon@gmail.com>
irq0 pushed a commit to irq0/ceph that referenced this pull request Oct 25, 2022
rgw/build: Add FMT_DEPRECATED_OSTREAM flag to avoid compilation issues
tobias-urdin pushed a commit to tobias-urdin/ceph that referenced this pull request Aug 2, 2023
Add multipart tests with invalid parts

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
leonid-s-usov pushed a commit to leonid-s-usov/ceph-ceph that referenced this pull request Mar 10, 2024
The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@ibm.com>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
yuvalif pushed a commit to yuvalif/ceph that referenced this pull request Mar 13, 2024
The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@ibm.com>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
yuvalif pushed a commit to yuvalif/ceph that referenced this pull request Aug 21, 2024
This is a combination of 7 commits in order to ease maintenance.

This commit is extracted from the initial commit that added the
call_home_agent mgr module (de6cbfb),
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/de6cbfbde53c64877941751d2ef5f8198ae5dccc

This commit was created with:

  $ git format-patch -1 de6cbfb -- src/cephadm/cephadm.py
  0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  $
  $ git apply -3 0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.
  $
  $ git add src/cephadm/cephadm.py

Signed-off-by: Yaarit Hatuka <yhatuka@ibm.com>

cephadm: fix setting first and last name fields for call home

During bootstrap we were setting the email field to
be the email, first name, and last name in succession
so if all these fields were provided the email would end
up as the last name and the actual email and first name
would be thrown away.

The fix is pretty self-explanatory

Resvoles: rhbz#2242916

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 54a07e5)
(cherry picked from commit 9989d06)

cephadm: fix call home bootstrap error message

Specifically

--ceph-call-home-contect-email ("contect")-> --ceph-call-home-contact-email
--ceph-call-home-context-phone ("context") -> --ceph-call-home-contact-phone
--ceph-call-home-contact-first-name (for last name setting)
-> --ceph-call-home-contact-last-name

Resolves: rhbz#2242918

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 1623928)
(cherry picked from commit 0c1fea8)

cephadm: fix bootstrap with --enable-storage-insights set

If --enable-storage-insights is set, there was an
additional check that we aren't enabling storage insights
but not call home. This check was broken as it was
checking "enable_call_home" instead of "enable_ibm_call_home"
attribute on the ctx object.

Resolves: rhbz#2243115

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 41e2ef7)
(cherry picked from commit 4d8b471)

Conflicts:
	src/cephadm/cephadm.py

<<<<<<< HEAD
    # initial vars
    ctx.fsid = ctx.fsid or make_fsid()
    fsid = ctx.fsid
    if not is_fsid(fsid):
        raise Error('not an fsid: %s' % fsid)

    if ctx.enable_storage_insights and not ctx.enable_call_home:
=======
    if ctx.enable_storage_insights and not ctx.enable_ibm_call_home:
>>>>>>> 4d8b471 (cephadm: fix bootstrap with --enable-storage-insights set)
        raise Error('Cannot enable Storage Insights without enabling call home (--enable-ibm-call-home)')
    elif ctx.enable_ibm_call_home:
        verify_call_home_settings(ctx)

Conflict was reslolved by keeping everything, except for:
    if ctx.enable_storage_insights and not ctx.enable_call_home:

mgr/callhome: cephadm sos command wrapper

Implementation of a wrapper for the sos command in cephadm

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@ibm.com>
(cherry picked from commit e2108ba60b025d2813bcece7fa4dbb7998893ad7)

Resolves: rhbz#2264462
          https://bugzilla.redhat.com/show_bug.cgi?id=2264462
(cherry picked from commit 4b0049f)

mgr/ccha: Fix cephadm sos command error (ceph#53)

The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@ibm.com>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
(cherry picked from commit 873b28e)

cephadm: make cephadm sos cmd more robust (ceph#56)

This commit is extracted from bac75bb
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/bac75bb1b9052982fd9b4ebc3ff5116b67081c54

This commit was created with:

  $ git format-patch -1 bac75bb -- src/cephadm/cephadm.py
  0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  $
  $ git apply -3 0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.

Signed-off-by: Yaarit Hatuka <yhatuka@ibm.com>
yuvalif pushed a commit to yuvalif/ceph that referenced this pull request Sep 16, 2024
This is a combination of 7 commits in order to ease maintenance.

This commit is extracted from the initial commit that added the
call_home_agent mgr module (de6cbfb),
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/de6cbfbde53c64877941751d2ef5f8198ae5dccc

This commit was created with:

  $ git format-patch -1 de6cbfb -- src/cephadm/cephadm.py
  0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  $
  $ git apply -3 0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.
  $
  $ git add src/cephadm/cephadm.py

Signed-off-by: Yaarit Hatuka <yhatuka@ibm.com>

cephadm: fix setting first and last name fields for call home

During bootstrap we were setting the email field to
be the email, first name, and last name in succession
so if all these fields were provided the email would end
up as the last name and the actual email and first name
would be thrown away.

The fix is pretty self-explanatory

Resvoles: rhbz#2242916

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 54a07e5)
(cherry picked from commit 9989d06)

cephadm: fix call home bootstrap error message

Specifically

--ceph-call-home-contect-email ("contect")-> --ceph-call-home-contact-email
--ceph-call-home-context-phone ("context") -> --ceph-call-home-contact-phone
--ceph-call-home-contact-first-name (for last name setting)
-> --ceph-call-home-contact-last-name

Resolves: rhbz#2242918

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 1623928)
(cherry picked from commit 0c1fea8)

cephadm: fix bootstrap with --enable-storage-insights set

If --enable-storage-insights is set, there was an
additional check that we aren't enabling storage insights
but not call home. This check was broken as it was
checking "enable_call_home" instead of "enable_ibm_call_home"
attribute on the ctx object.

Resolves: rhbz#2243115

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 41e2ef7)
(cherry picked from commit 4d8b471)

Conflicts:
	src/cephadm/cephadm.py

<<<<<<< HEAD
    # initial vars
    ctx.fsid = ctx.fsid or make_fsid()
    fsid = ctx.fsid
    if not is_fsid(fsid):
        raise Error('not an fsid: %s' % fsid)

    if ctx.enable_storage_insights and not ctx.enable_call_home:
=======
    if ctx.enable_storage_insights and not ctx.enable_ibm_call_home:
>>>>>>> 4d8b471 (cephadm: fix bootstrap with --enable-storage-insights set)
        raise Error('Cannot enable Storage Insights without enabling call home (--enable-ibm-call-home)')
    elif ctx.enable_ibm_call_home:
        verify_call_home_settings(ctx)

Conflict was reslolved by keeping everything, except for:
    if ctx.enable_storage_insights and not ctx.enable_call_home:

mgr/callhome: cephadm sos command wrapper

Implementation of a wrapper for the sos command in cephadm

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@ibm.com>
(cherry picked from commit e2108ba60b025d2813bcece7fa4dbb7998893ad7)

Resolves: rhbz#2264462
          https://bugzilla.redhat.com/show_bug.cgi?id=2264462
(cherry picked from commit 4b0049f)

mgr/ccha: Fix cephadm sos command error (ceph#53)

The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@ibm.com>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
(cherry picked from commit 873b28e)

cephadm: make cephadm sos cmd more robust (ceph#56)

This commit is extracted from bac75bb
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/bac75bb1b9052982fd9b4ebc3ff5116b67081c54

This commit was created with:

  $ git format-patch -1 bac75bb -- src/cephadm/cephadm.py
  0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  $
  $ git apply -3 0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.

Signed-off-by: Yaarit Hatuka <yhatuka@ibm.com>
(cherry picked from commit 37be1c3)

Conflicts:
        src/cephadm/cephadm.py

The conflict we saw:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

<<<<<<< HEAD
=======
    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # enable autotune for osd_memory_target
    logger.info('Enabling autotune for osd_memory_target')
    cli(['config', 'set', 'osd', 'osd_memory_target_autotune', 'true'])

>>>>>>> 37be1c3 (cephadm: add Call Home and Storage Insights)
    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

The conflict was resolved by removing the osd autotune lines:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```
mattbenjamin pushed a commit to linuxbox2/ceph that referenced this pull request Oct 22, 2024
This is a combination of 7 commits in order to ease maintenance.

This commit is extracted from the initial commit that added the
call_home_agent mgr module (de6cbfb),
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/de6cbfbde53c64877941751d2ef5f8198ae5dccc

This commit was created with:

  $ git format-patch -1 de6cbfb -- src/cephadm/cephadm.py
  0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  $
  $ git apply -3 0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.
  $
  $ git add src/cephadm/cephadm.py

Signed-off-by: Yaarit Hatuka <yhatuka@ibm.com>

cephadm: fix setting first and last name fields for call home

During bootstrap we were setting the email field to
be the email, first name, and last name in succession
so if all these fields were provided the email would end
up as the last name and the actual email and first name
would be thrown away.

The fix is pretty self-explanatory

Resvoles: rhbz#2242916

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 54a07e5)
(cherry picked from commit 9989d06)

cephadm: fix call home bootstrap error message

Specifically

--ceph-call-home-contect-email ("contect")-> --ceph-call-home-contact-email
--ceph-call-home-context-phone ("context") -> --ceph-call-home-contact-phone
--ceph-call-home-contact-first-name (for last name setting)
-> --ceph-call-home-contact-last-name

Resolves: rhbz#2242918

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 1623928)
(cherry picked from commit 0c1fea8)

cephadm: fix bootstrap with --enable-storage-insights set

If --enable-storage-insights is set, there was an
additional check that we aren't enabling storage insights
but not call home. This check was broken as it was
checking "enable_call_home" instead of "enable_ibm_call_home"
attribute on the ctx object.

Resolves: rhbz#2243115

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 41e2ef7)
(cherry picked from commit 4d8b471)

Conflicts:
	src/cephadm/cephadm.py

<<<<<<< HEAD
    # initial vars
    ctx.fsid = ctx.fsid or make_fsid()
    fsid = ctx.fsid
    if not is_fsid(fsid):
        raise Error('not an fsid: %s' % fsid)

    if ctx.enable_storage_insights and not ctx.enable_call_home:
=======
    if ctx.enable_storage_insights and not ctx.enable_ibm_call_home:
>>>>>>> 4d8b471 (cephadm: fix bootstrap with --enable-storage-insights set)
        raise Error('Cannot enable Storage Insights without enabling call home (--enable-ibm-call-home)')
    elif ctx.enable_ibm_call_home:
        verify_call_home_settings(ctx)

Conflict was reslolved by keeping everything, except for:
    if ctx.enable_storage_insights and not ctx.enable_call_home:

mgr/callhome: cephadm sos command wrapper

Implementation of a wrapper for the sos command in cephadm

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@ibm.com>
(cherry picked from commit e2108ba60b025d2813bcece7fa4dbb7998893ad7)

Resolves: rhbz#2264462
          https://bugzilla.redhat.com/show_bug.cgi?id=2264462
(cherry picked from commit 4b0049f)

mgr/ccha: Fix cephadm sos command error (ceph#53)

The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@ibm.com>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
(cherry picked from commit 873b28e)

cephadm: make cephadm sos cmd more robust (ceph#56)

This commit is extracted from bac75bb
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/bac75bb1b9052982fd9b4ebc3ff5116b67081c54

This commit was created with:

  $ git format-patch -1 bac75bb -- src/cephadm/cephadm.py
  0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  $
  $ git apply -3 0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.

Signed-off-by: Yaarit Hatuka <yhatuka@ibm.com>
(cherry picked from commit 37be1c3)

Conflicts:
        src/cephadm/cephadm.py

The conflict we saw:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

<<<<<<< HEAD
=======
    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # enable autotune for osd_memory_target
    logger.info('Enabling autotune for osd_memory_target')
    cli(['config', 'set', 'osd', 'osd_memory_target_autotune', 'true'])

>>>>>>> 37be1c3 (cephadm: add Call Home and Storage Insights)
    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

The conflict was resolved by removing the osd autotune lines:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```
athanatos pushed a commit to athanatos/ceph that referenced this pull request Feb 14, 2025
Change variable name delay to finishing_check_period for clarity

Reviewed-by: J. Eric Ivancich <ivancich@redhat.com>
andrewschoen referenced this pull request in ibmstorage/ceph Feb 25, 2025
This is a combination of 7 commits in order to ease maintenance.

This commit is extracted from the initial commit that added the
call_home_agent mgr module (de6cbfb),
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/de6cbfbde53c64877941751d2ef5f8198ae5dccc

This commit was created with:

  $ git format-patch -1 de6cbfb -- src/cephadm/cephadm.py
  0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  $
  $ git apply -3 0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.
  $
  $ git add src/cephadm/cephadm.py

Signed-off-by: Yaarit Hatuka <yhatuka@ibm.com>

cephadm: fix setting first and last name fields for call home

During bootstrap we were setting the email field to
be the email, first name, and last name in succession
so if all these fields were provided the email would end
up as the last name and the actual email and first name
would be thrown away.

The fix is pretty self-explanatory

Resvoles: rhbz#2242916

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 54a07e5)
(cherry picked from commit 9989d06)

cephadm: fix call home bootstrap error message

Specifically

--ceph-call-home-contect-email ("contect")-> --ceph-call-home-contact-email
--ceph-call-home-context-phone ("context") -> --ceph-call-home-contact-phone
--ceph-call-home-contact-first-name (for last name setting)
-> --ceph-call-home-contact-last-name

Resolves: rhbz#2242918

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 1623928)
(cherry picked from commit 0c1fea8)

cephadm: fix bootstrap with --enable-storage-insights set

If --enable-storage-insights is set, there was an
additional check that we aren't enabling storage insights
but not call home. This check was broken as it was
checking "enable_call_home" instead of "enable_ibm_call_home"
attribute on the ctx object.

Resolves: rhbz#2243115

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 41e2ef7)
(cherry picked from commit 4d8b471)

Conflicts:
	src/cephadm/cephadm.py

<<<<<<< HEAD
    # initial vars
    ctx.fsid = ctx.fsid or make_fsid()
    fsid = ctx.fsid
    if not is_fsid(fsid):
        raise Error('not an fsid: %s' % fsid)

    if ctx.enable_storage_insights and not ctx.enable_call_home:
=======
    if ctx.enable_storage_insights and not ctx.enable_ibm_call_home:
>>>>>>> 4d8b471 (cephadm: fix bootstrap with --enable-storage-insights set)
        raise Error('Cannot enable Storage Insights without enabling call home (--enable-ibm-call-home)')
    elif ctx.enable_ibm_call_home:
        verify_call_home_settings(ctx)

Conflict was reslolved by keeping everything, except for:
    if ctx.enable_storage_insights and not ctx.enable_call_home:

mgr/callhome: cephadm sos command wrapper

Implementation of a wrapper for the sos command in cephadm

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@ibm.com>
(cherry picked from commit e2108ba60b025d2813bcece7fa4dbb7998893ad7)

Resolves: rhbz#2264462
          https://bugzilla.redhat.com/show_bug.cgi?id=2264462
(cherry picked from commit 4b0049f)

mgr/ccha: Fix cephadm sos command error (#53)

The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@ibm.com>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
(cherry picked from commit 873b28e)

cephadm: make cephadm sos cmd more robust (ceph#56)

This commit is extracted from bac75bb
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/bac75bb1b9052982fd9b4ebc3ff5116b67081c54

This commit was created with:

  $ git format-patch -1 bac75bb -- src/cephadm/cephadm.py
  0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  $
  $ git apply -3 0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.

Signed-off-by: Yaarit Hatuka <yhatuka@ibm.com>
(cherry picked from commit 37be1c3)

Conflicts:
        src/cephadm/cephadm.py

The conflict we saw:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

<<<<<<< HEAD
=======
    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # enable autotune for osd_memory_target
    logger.info('Enabling autotune for osd_memory_target')
    cli(['config', 'set', 'osd', 'osd_memory_target_autotune', 'true'])

>>>>>>> 37be1c3 (cephadm: add Call Home and Storage Insights)
    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

The conflict was resolved by removing the osd autotune lines:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```
rishabh-d-dave pushed a commit to rishabh-d-dave/ceph that referenced this pull request Mar 19, 2025
This is a combination of 7 commits in order to ease maintenance.

This commit is extracted from the initial commit that added the
call_home_agent mgr module (de6cbfb),
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/de6cbfbde53c64877941751d2ef5f8198ae5dccc

This commit was created with:

  $ git format-patch -1 de6cbfb -- src/cephadm/cephadm.py
  0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  $
  $ git apply -3 0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.
  $
  $ git add src/cephadm/cephadm.py

Signed-off-by: Yaarit Hatuka <yhatuka@ibm.com>

cephadm: fix setting first and last name fields for call home

During bootstrap we were setting the email field to
be the email, first name, and last name in succession
so if all these fields were provided the email would end
up as the last name and the actual email and first name
would be thrown away.

The fix is pretty self-explanatory

Resvoles: rhbz#2242916

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 54a07e5)
(cherry picked from commit 9989d06)

cephadm: fix call home bootstrap error message

Specifically

--ceph-call-home-contect-email ("contect")-> --ceph-call-home-contact-email
--ceph-call-home-context-phone ("context") -> --ceph-call-home-contact-phone
--ceph-call-home-contact-first-name (for last name setting)
-> --ceph-call-home-contact-last-name

Resolves: rhbz#2242918

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 1623928)
(cherry picked from commit 0c1fea8)

cephadm: fix bootstrap with --enable-storage-insights set

If --enable-storage-insights is set, there was an
additional check that we aren't enabling storage insights
but not call home. This check was broken as it was
checking "enable_call_home" instead of "enable_ibm_call_home"
attribute on the ctx object.

Resolves: rhbz#2243115

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 41e2ef7)
(cherry picked from commit 4d8b471)

Conflicts:
	src/cephadm/cephadm.py

<<<<<<< HEAD
    # initial vars
    ctx.fsid = ctx.fsid or make_fsid()
    fsid = ctx.fsid
    if not is_fsid(fsid):
        raise Error('not an fsid: %s' % fsid)

    if ctx.enable_storage_insights and not ctx.enable_call_home:
=======
    if ctx.enable_storage_insights and not ctx.enable_ibm_call_home:
>>>>>>> 4d8b471 (cephadm: fix bootstrap with --enable-storage-insights set)
        raise Error('Cannot enable Storage Insights without enabling call home (--enable-ibm-call-home)')
    elif ctx.enable_ibm_call_home:
        verify_call_home_settings(ctx)

Conflict was reslolved by keeping everything, except for:
    if ctx.enable_storage_insights and not ctx.enable_call_home:

mgr/callhome: cephadm sos command wrapper

Implementation of a wrapper for the sos command in cephadm

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@ibm.com>
(cherry picked from commit e2108ba60b025d2813bcece7fa4dbb7998893ad7)

Resolves: rhbz#2264462
          https://bugzilla.redhat.com/show_bug.cgi?id=2264462
(cherry picked from commit 4b0049f)

mgr/ccha: Fix cephadm sos command error (ceph#53)

The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@ibm.com>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
(cherry picked from commit 873b28e)

cephadm: make cephadm sos cmd more robust (ceph#56)

This commit is extracted from bac75bb
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/bac75bb1b9052982fd9b4ebc3ff5116b67081c54

This commit was created with:

  $ git format-patch -1 bac75bb -- src/cephadm/cephadm.py
  0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  $
  $ git apply -3 0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.

Signed-off-by: Yaarit Hatuka <yhatuka@ibm.com>
(cherry picked from commit 37be1c3)

Conflicts:
        src/cephadm/cephadm.py

The conflict we saw:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

<<<<<<< HEAD
=======
    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # enable autotune for osd_memory_target
    logger.info('Enabling autotune for osd_memory_target')
    cli(['config', 'set', 'osd', 'osd_memory_target_autotune', 'true'])

>>>>>>> 37be1c3 (cephadm: add Call Home and Storage Insights)
    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

The conflict was resolved by removing the osd autotune lines:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```
hasan4791 pushed a commit to hasan4791/ceph that referenced this pull request Jan 6, 2026
This is a combination of 7 commits in order to ease maintenance.

This commit is extracted from the initial commit that added the
call_home_agent mgr module (de6cbfb),
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/de6cbfbde53c64877941751d2ef5f8198ae5dccc

This commit was created with:

  $ git format-patch -1 de6cbfb -- src/cephadm/cephadm.py
  0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  $
  $ git apply -3 0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.
  $
  $ git add src/cephadm/cephadm.py

Signed-off-by: Yaarit Hatuka <yhatuka@ibm.com>

cephadm: fix setting first and last name fields for call home

During bootstrap we were setting the email field to
be the email, first name, and last name in succession
so if all these fields were provided the email would end
up as the last name and the actual email and first name
would be thrown away.

The fix is pretty self-explanatory

Resvoles: rhbz#2242916

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 54a07e5)
(cherry picked from commit 9989d06)

cephadm: fix call home bootstrap error message

Specifically

--ceph-call-home-contect-email ("contect")-> --ceph-call-home-contact-email
--ceph-call-home-context-phone ("context") -> --ceph-call-home-contact-phone
--ceph-call-home-contact-first-name (for last name setting)
-> --ceph-call-home-contact-last-name

Resolves: rhbz#2242918

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 1623928)
(cherry picked from commit 0c1fea8)

cephadm: fix bootstrap with --enable-storage-insights set

If --enable-storage-insights is set, there was an
additional check that we aren't enabling storage insights
but not call home. This check was broken as it was
checking "enable_call_home" instead of "enable_ibm_call_home"
attribute on the ctx object.

Resolves: rhbz#2243115

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 41e2ef7)
(cherry picked from commit 4d8b471)

Conflicts:
	src/cephadm/cephadm.py

<<<<<<< HEAD
    # initial vars
    ctx.fsid = ctx.fsid or make_fsid()
    fsid = ctx.fsid
    if not is_fsid(fsid):
        raise Error('not an fsid: %s' % fsid)

    if ctx.enable_storage_insights and not ctx.enable_call_home:
=======
    if ctx.enable_storage_insights and not ctx.enable_ibm_call_home:
>>>>>>> 4d8b471 (cephadm: fix bootstrap with --enable-storage-insights set)
        raise Error('Cannot enable Storage Insights without enabling call home (--enable-ibm-call-home)')
    elif ctx.enable_ibm_call_home:
        verify_call_home_settings(ctx)

Conflict was reslolved by keeping everything, except for:
    if ctx.enable_storage_insights and not ctx.enable_call_home:

mgr/callhome: cephadm sos command wrapper

Implementation of a wrapper for the sos command in cephadm

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@ibm.com>
(cherry picked from commit e2108ba60b025d2813bcece7fa4dbb7998893ad7)

Resolves: rhbz#2264462
          https://bugzilla.redhat.com/show_bug.cgi?id=2264462
(cherry picked from commit 4b0049f)

mgr/ccha: Fix cephadm sos command error (ceph#53)

The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@ibm.com>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
(cherry picked from commit 873b28e)

cephadm: make cephadm sos cmd more robust (ceph#56)

This commit is extracted from bac75bb
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/bac75bb1b9052982fd9b4ebc3ff5116b67081c54

This commit was created with:

  $ git format-patch -1 bac75bb -- src/cephadm/cephadm.py
  0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  $
  $ git apply -3 0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.

Signed-off-by: Yaarit Hatuka <yhatuka@ibm.com>
(cherry picked from commit 37be1c3)

Conflicts:
        src/cephadm/cephadm.py

The conflict we saw:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

<<<<<<< HEAD
=======
    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # enable autotune for osd_memory_target
    logger.info('Enabling autotune for osd_memory_target')
    cli(['config', 'set', 'osd', 'osd_memory_target_autotune', 'true'])

>>>>>>> 37be1c3 (cephadm: add Call Home and Storage Insights)
    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

The conflict was resolved by removing the osd autotune lines:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

(cherry picked from commit 8b565c3)
rkachach pushed a commit to rkachach/ceph that referenced this pull request Mar 3, 2026
This is a combination of 7 commits in order to ease maintenance.

This commit is extracted from the initial commit that added the
call_home_agent mgr module (de6cbfb),
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/de6cbfbde53c64877941751d2ef5f8198ae5dccc

This commit was created with:

  $ git format-patch -1 de6cbfb -- src/cephadm/cephadm.py
  0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  $
  $ git apply -3 0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.
  $
  $ git add src/cephadm/cephadm.py

Signed-off-by: Yaarit Hatuka <yhatuka@ibm.com>

cephadm: fix setting first and last name fields for call home

During bootstrap we were setting the email field to
be the email, first name, and last name in succession
so if all these fields were provided the email would end
up as the last name and the actual email and first name
would be thrown away.

The fix is pretty self-explanatory

Resvoles: rhbz#2242916

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 54a07e5)
(cherry picked from commit 9989d06)

cephadm: fix call home bootstrap error message

Specifically

--ceph-call-home-contect-email ("contect")-> --ceph-call-home-contact-email
--ceph-call-home-context-phone ("context") -> --ceph-call-home-contact-phone
--ceph-call-home-contact-first-name (for last name setting)
-> --ceph-call-home-contact-last-name

Resolves: rhbz#2242918

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 1623928)
(cherry picked from commit 0c1fea8)

cephadm: fix bootstrap with --enable-storage-insights set

If --enable-storage-insights is set, there was an
additional check that we aren't enabling storage insights
but not call home. This check was broken as it was
checking "enable_call_home" instead of "enable_ibm_call_home"
attribute on the ctx object.

Resolves: rhbz#2243115

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 41e2ef7)
(cherry picked from commit 4d8b471)

Conflicts:
	src/cephadm/cephadm.py

<<<<<<< HEAD
    # initial vars
    ctx.fsid = ctx.fsid or make_fsid()
    fsid = ctx.fsid
    if not is_fsid(fsid):
        raise Error('not an fsid: %s' % fsid)

    if ctx.enable_storage_insights and not ctx.enable_call_home:
=======
    if ctx.enable_storage_insights and not ctx.enable_ibm_call_home:
>>>>>>> 4d8b471 (cephadm: fix bootstrap with --enable-storage-insights set)
        raise Error('Cannot enable Storage Insights without enabling call home (--enable-ibm-call-home)')
    elif ctx.enable_ibm_call_home:
        verify_call_home_settings(ctx)

Conflict was reslolved by keeping everything, except for:
    if ctx.enable_storage_insights and not ctx.enable_call_home:

mgr/callhome: cephadm sos command wrapper

Implementation of a wrapper for the sos command in cephadm

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@ibm.com>
(cherry picked from commit e2108ba60b025d2813bcece7fa4dbb7998893ad7)

Resolves: rhbz#2264462
          https://bugzilla.redhat.com/show_bug.cgi?id=2264462
(cherry picked from commit 4b0049f)

mgr/ccha: Fix cephadm sos command error (ceph#53)

The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@ibm.com>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
(cherry picked from commit 873b28e)

cephadm: make cephadm sos cmd more robust (ceph#56)

This commit is extracted from bac75bb
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/bac75bb1b9052982fd9b4ebc3ff5116b67081c54

This commit was created with:

  $ git format-patch -1 bac75bb -- src/cephadm/cephadm.py
  0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  $
  $ git apply -3 0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.

Signed-off-by: Yaarit Hatuka <yhatuka@ibm.com>
(cherry picked from commit 37be1c3)

Conflicts:
        src/cephadm/cephadm.py

The conflict we saw:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

<<<<<<< HEAD
=======
    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # enable autotune for osd_memory_target
    logger.info('Enabling autotune for osd_memory_target')
    cli(['config', 'set', 'osd', 'osd_memory_target_autotune', 'true'])

>>>>>>> 37be1c3 (cephadm: add Call Home and Storage Insights)
    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

The conflict was resolved by removing the osd autotune lines:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

(cherry picked from commit 8b565c3)
(cherry picked from commit a22f065)
phlogistonjohn pushed a commit to phlogistonjohn/ceph that referenced this pull request Mar 6, 2026
This is a combination of 7 commits in order to ease maintenance.

This commit is extracted from the initial commit that added the
call_home_agent mgr module (de6cbfb),
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/de6cbfbde53c64877941751d2ef5f8198ae5dccc

This commit was created with:

  $ git format-patch -1 de6cbfb -- src/cephadm/cephadm.py
  0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  $
  $ git apply -3 0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.
  $
  $ git add src/cephadm/cephadm.py

Signed-off-by: Yaarit Hatuka <yhatuka@ibm.com>

cephadm: fix setting first and last name fields for call home

During bootstrap we were setting the email field to
be the email, first name, and last name in succession
so if all these fields were provided the email would end
up as the last name and the actual email and first name
would be thrown away.

The fix is pretty self-explanatory

Resvoles: rhbz#2242916

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 54a07e5)
(cherry picked from commit 9989d06)

cephadm: fix call home bootstrap error message

Specifically

--ceph-call-home-contect-email ("contect")-> --ceph-call-home-contact-email
--ceph-call-home-context-phone ("context") -> --ceph-call-home-contact-phone
--ceph-call-home-contact-first-name (for last name setting)
-> --ceph-call-home-contact-last-name

Resolves: rhbz#2242918

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 1623928)
(cherry picked from commit 0c1fea8)

cephadm: fix bootstrap with --enable-storage-insights set

If --enable-storage-insights is set, there was an
additional check that we aren't enabling storage insights
but not call home. This check was broken as it was
checking "enable_call_home" instead of "enable_ibm_call_home"
attribute on the ctx object.

Resolves: rhbz#2243115

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 41e2ef7)
(cherry picked from commit 4d8b471)

Conflicts:
	src/cephadm/cephadm.py

<<<<<<< HEAD
    # initial vars
    ctx.fsid = ctx.fsid or make_fsid()
    fsid = ctx.fsid
    if not is_fsid(fsid):
        raise Error('not an fsid: %s' % fsid)

    if ctx.enable_storage_insights and not ctx.enable_call_home:
=======
    if ctx.enable_storage_insights and not ctx.enable_ibm_call_home:
>>>>>>> 4d8b471 (cephadm: fix bootstrap with --enable-storage-insights set)
        raise Error('Cannot enable Storage Insights without enabling call home (--enable-ibm-call-home)')
    elif ctx.enable_ibm_call_home:
        verify_call_home_settings(ctx)

Conflict was reslolved by keeping everything, except for:
    if ctx.enable_storage_insights and not ctx.enable_call_home:

mgr/callhome: cephadm sos command wrapper

Implementation of a wrapper for the sos command in cephadm

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@ibm.com>
(cherry picked from commit e2108ba60b025d2813bcece7fa4dbb7998893ad7)

Resolves: rhbz#2264462
          https://bugzilla.redhat.com/show_bug.cgi?id=2264462
(cherry picked from commit 4b0049f)

mgr/ccha: Fix cephadm sos command error (ceph#53)

The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@ibm.com>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
(cherry picked from commit 873b28e)

cephadm: make cephadm sos cmd more robust (ceph#56)

This commit is extracted from bac75bb
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/bac75bb1b9052982fd9b4ebc3ff5116b67081c54

This commit was created with:

  $ git format-patch -1 bac75bb -- src/cephadm/cephadm.py
  0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  $
  $ git apply -3 0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.

Signed-off-by: Yaarit Hatuka <yhatuka@ibm.com>
(cherry picked from commit 37be1c3)

Conflicts:
        src/cephadm/cephadm.py

The conflict we saw:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

<<<<<<< HEAD
=======
    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # enable autotune for osd_memory_target
    logger.info('Enabling autotune for osd_memory_target')
    cli(['config', 'set', 'osd', 'osd_memory_target_autotune', 'true'])

>>>>>>> 37be1c3 (cephadm: add Call Home and Storage Insights)
    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

The conflict was resolved by removing the osd autotune lines:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

(cherry picked from commit 8b565c3)
(cherry picked from commit a22f065)
phlogistonjohn pushed a commit to phlogistonjohn/ceph that referenced this pull request Mar 6, 2026
This is a combination of 7 commits in order to ease maintenance.

This commit is extracted from the initial commit that added the
call_home_agent mgr module (de6cbfb),
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/de6cbfbde53c64877941751d2ef5f8198ae5dccc

This commit was created with:

  $ git format-patch -1 de6cbfb -- src/cephadm/cephadm.py
  0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  $
  $ git apply -3 0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.
  $
  $ git add src/cephadm/cephadm.py

Signed-off-by: Yaarit Hatuka <yhatuka@ibm.com>

cephadm: fix setting first and last name fields for call home

During bootstrap we were setting the email field to
be the email, first name, and last name in succession
so if all these fields were provided the email would end
up as the last name and the actual email and first name
would be thrown away.

The fix is pretty self-explanatory

Resvoles: rhbz#2242916

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 54a07e5)
(cherry picked from commit 9989d06)

cephadm: fix call home bootstrap error message

Specifically

--ceph-call-home-contect-email ("contect")-> --ceph-call-home-contact-email
--ceph-call-home-context-phone ("context") -> --ceph-call-home-contact-phone
--ceph-call-home-contact-first-name (for last name setting)
-> --ceph-call-home-contact-last-name

Resolves: rhbz#2242918

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 1623928)
(cherry picked from commit 0c1fea8)

cephadm: fix bootstrap with --enable-storage-insights set

If --enable-storage-insights is set, there was an
additional check that we aren't enabling storage insights
but not call home. This check was broken as it was
checking "enable_call_home" instead of "enable_ibm_call_home"
attribute on the ctx object.

Resolves: rhbz#2243115

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 41e2ef7)
(cherry picked from commit 4d8b471)

Conflicts:
	src/cephadm/cephadm.py

<<<<<<< HEAD
    # initial vars
    ctx.fsid = ctx.fsid or make_fsid()
    fsid = ctx.fsid
    if not is_fsid(fsid):
        raise Error('not an fsid: %s' % fsid)

    if ctx.enable_storage_insights and not ctx.enable_call_home:
=======
    if ctx.enable_storage_insights and not ctx.enable_ibm_call_home:
>>>>>>> 4d8b471 (cephadm: fix bootstrap with --enable-storage-insights set)
        raise Error('Cannot enable Storage Insights without enabling call home (--enable-ibm-call-home)')
    elif ctx.enable_ibm_call_home:
        verify_call_home_settings(ctx)

Conflict was reslolved by keeping everything, except for:
    if ctx.enable_storage_insights and not ctx.enable_call_home:

mgr/callhome: cephadm sos command wrapper

Implementation of a wrapper for the sos command in cephadm

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@ibm.com>
(cherry picked from commit e2108ba60b025d2813bcece7fa4dbb7998893ad7)

Resolves: rhbz#2264462
          https://bugzilla.redhat.com/show_bug.cgi?id=2264462
(cherry picked from commit 4b0049f)

mgr/ccha: Fix cephadm sos command error (ceph#53)

The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@ibm.com>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
(cherry picked from commit 873b28e)

cephadm: make cephadm sos cmd more robust (ceph#56)

This commit is extracted from bac75bb
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/bac75bb1b9052982fd9b4ebc3ff5116b67081c54

This commit was created with:

  $ git format-patch -1 bac75bb -- src/cephadm/cephadm.py
  0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  $
  $ git apply -3 0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.

Signed-off-by: Yaarit Hatuka <yhatuka@ibm.com>
(cherry picked from commit 37be1c3)

Conflicts:
        src/cephadm/cephadm.py

The conflict we saw:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

<<<<<<< HEAD
=======
    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # enable autotune for osd_memory_target
    logger.info('Enabling autotune for osd_memory_target')
    cli(['config', 'set', 'osd', 'osd_memory_target_autotune', 'true'])

>>>>>>> 37be1c3 (cephadm: add Call Home and Storage Insights)
    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

The conflict was resolved by removing the osd autotune lines:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

(cherry picked from commit 8b565c3)
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

Successfully merging this pull request may close these issues.

1 participant